com.lowagie.text.pdf.internal

Class PdfVersionImp

public class PdfVersionImp extends Object implements PdfVersion

Stores the PDF version information, knows how to write a PDF Header, and how to add the version to the catalog (if necessary).
Field Summary
protected booleanappendmode
Indicates if we are working in append mode.
protected PdfNamecatalog_version
The version that will be written to the catalog.
protected booleanheaderWasWritten
Indicates if the header was already written.
protected charheader_version
The version that was or will be written to the header.
static byte[][]HEADER
Contains different strings that are part of the header.
Method Summary
voidaddToCatalog(PdfDictionary catalog)
Adds the version to the Catalog dictionary.
byte[]getVersionAsByteArray(char version)
Returns the version as a byte[].
PdfNamegetVersionAsName(char version)
Returns the PDF version as a name.
voidsetAppendmode(boolean appendmode)
Sets the append mode.
voidsetAtLeastPdfVersion(char version)
voidsetPdfVersion(char version)
voidsetPdfVersion(PdfName version)
voidwriteHeader(OutputStreamCounter os)
Writes the header to the OutputStreamCounter.

Field Detail

appendmode

protected boolean appendmode
Indicates if we are working in append mode.

catalog_version

protected PdfName catalog_version
The version that will be written to the catalog.

headerWasWritten

protected boolean headerWasWritten
Indicates if the header was already written.

header_version

protected char header_version
The version that was or will be written to the header.

HEADER

public static final byte[][] HEADER
Contains different strings that are part of the header.

Method Detail

addToCatalog

public void addToCatalog(PdfDictionary catalog)
Adds the version to the Catalog dictionary.

getVersionAsByteArray

public byte[] getVersionAsByteArray(char version)
Returns the version as a byte[].

Parameters: version the version character

getVersionAsName

public PdfName getVersionAsName(char version)
Returns the PDF version as a name.

Parameters: version the version character.

setAppendmode

public void setAppendmode(boolean appendmode)
Sets the append mode.

setAtLeastPdfVersion

public void setAtLeastPdfVersion(char version)

See Also: PdfVersion

setPdfVersion

public void setPdfVersion(char version)

See Also: PdfVersion

setPdfVersion

public void setPdfVersion(PdfName version)

See Also: setPdfVersion

writeHeader

public void writeHeader(OutputStreamCounter os)
Writes the header to the OutputStreamCounter.

Throws: IOException