|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.lowagie.text.pdf.internal.PdfVersionImp
public class PdfVersionImp
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 boolean |
appendmode
Indicates if we are working in append mode. |
protected PdfName |
catalog_version
The version that will be written to the catalog. |
protected PdfDictionary |
extensions
The extensions dictionary. |
static byte[][] |
HEADER
Contains different strings that are part of the header. |
protected char |
header_version
The version that was or will be written to the header. |
protected boolean |
headerWasWritten
Indicates if the header was already written. |
Constructor Summary | |
---|---|
PdfVersionImp()
|
Method Summary | |
---|---|
void |
addDeveloperExtension(PdfDeveloperExtension de)
Adds a developer extension to the Extensions dictionary in the Catalog. |
void |
addToCatalog(PdfDictionary catalog)
Adds the version to the Catalog dictionary. |
byte[] |
getVersionAsByteArray(char version)
Returns the version as a byte[]. |
PdfName |
getVersionAsName(char version)
Returns the PDF version as a name. |
void |
setAppendmode(boolean appendmode)
Sets the append mode. |
void |
setAtLeastPdfVersion(char version)
If the PDF Header hasn't been written yet, this changes the version as it will appear in the PDF Header, but only if the parameter refers to a higher version. |
void |
setPdfVersion(char version)
If the PDF Header hasn't been written yet, this changes the version as it will appear in the PDF Header. |
void |
setPdfVersion(PdfName version)
Sets the PDF version as it will appear in the Catalog. |
void |
writeHeader(OutputStreamCounter os)
Writes the header to the OutputStreamCounter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte[][] HEADER
protected boolean headerWasWritten
protected boolean appendmode
protected char header_version
protected PdfName catalog_version
protected PdfDictionary extensions
Constructor Detail |
---|
public PdfVersionImp()
Method Detail |
---|
public void setPdfVersion(char version)
PdfVersion
setPdfVersion
in interface PdfVersion
version
- a character representing the PDF versionPdfVersion.setPdfVersion(char)
public void setAtLeastPdfVersion(char version)
PdfVersion
setAtLeastPdfVersion
in interface PdfVersion
version
- a character representing the PDF versionPdfVersion.setAtLeastPdfVersion(char)
public void setPdfVersion(PdfName version)
PdfVersion
setPdfVersion
in interface PdfVersion
version
- the PDF name that will be used for the Version key in the catalogPdfVersion.setPdfVersion(com.lowagie.text.pdf.PdfName)
public void setAppendmode(boolean appendmode)
public void writeHeader(OutputStreamCounter os) throws java.io.IOException
java.io.IOException
public PdfName getVersionAsName(char version)
version
- the version character.public byte[] getVersionAsByteArray(char version)
version
- the version characterpublic void addToCatalog(PdfDictionary catalog)
public void addDeveloperExtension(PdfDeveloperExtension de)
PdfVersion
addDeveloperExtension
in interface PdfVersion
de
- an object that contains the extensions prefix and dictionaryPdfVersion.addDeveloperExtension(com.lowagie.text.pdf.PdfDeveloperExtension)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |