public class PdfWriter extends DocWriter implements PdfViewerPreferences, PdfEncryptionSettings, PdfVersion, PdfDocumentActions, PdfPageActions, PdfXConformance, PdfRunDirection, PdfAnnotations
DocWriter class for PDF.
When this PdfWriter is added
to a certain PdfDocument, the PDF representation of every Element
added to this Document will be written to the outputstream.
| Modifier and Type | Field and Description |
|---|---|
protected com.aowagie.text.pdf.PdfWriter.PdfBody |
body
body of the PDF document
|
static int |
CenterWindow
A viewer preference
|
protected int |
compressionLevel
The compression level of the content streams.
|
protected com.aowagie.text.pdf.PdfEncryption |
crypto
Contains the business logic for cryptography.
|
protected com.aowagie.text.pdf.PdfReaderInstance |
currentPdfReaderInstance |
static int |
DirectionL2R
A viewer preference
|
static int |
DirectionR2L
A viewer preference
|
static int |
DisplayDocTitle
A viewer preference
|
protected HashSet |
documentOCG
A hashSet containing all the PdfLayer objects.
|
static int |
FitWindow
A viewer preference
|
protected boolean |
fullCompression
Holds value of property fullCompression.
|
static int |
HideMenubar
A viewer preference
|
static int |
HideToolbar
A viewer preference
|
static int |
HideWindowUI
A viewer preference
|
protected List |
newBookmarks |
static int |
NonFullScreenPageModeUseNone
A viewer preference
|
static int |
NonFullScreenPageModeUseOC
A viewer preference
|
static int |
NonFullScreenPageModeUseOutlines
A viewer preference
|
static int |
NonFullScreenPageModeUseThumbs
A viewer preference
|
protected PdfArray |
OCGLocked
The locked array in an OCG dictionary
|
protected PdfArray |
OCGRadioGroup
The RBGroups array in an OCG dictionary
|
protected com.aowagie.text.pdf.PdfOCProperties |
OCProperties
The OCProperties in a catalog dictionary.
|
static int |
PageLayoutOneColumn
A viewer preference
|
static int |
PageLayoutSinglePage
A viewer preference
|
static int |
PageLayoutTwoColumnLeft
A viewer preference
|
static int |
PageLayoutTwoColumnRight
A viewer preference
|
static int |
PageLayoutTwoPageLeft
A viewer preference
|
static int |
PageLayoutTwoPageRight
A viewer preference
|
static int |
PageModeFullScreen
A viewer preference
|
static int |
PageModeUseAttachments
A viewer preference
|
static int |
PageModeUseNone
A viewer preference
|
static int |
PageModeUseOC
A viewer preference
|
static int |
PageModeUseOutlines
A viewer preference
|
static int |
PageModeUseThumbs
A viewer preference
|
protected com.aowagie.text.pdf.PdfDocument |
pdf
the pdfdocument object.
|
protected PdfVersionImp |
pdf_version
Stores the version information for the header and the catalog.
|
static PdfName |
PDF_VERSION_1_2
possible PDF version (catalog)
|
static PdfName |
PDF_VERSION_1_3
possible PDF version (catalog)
|
static PdfName |
PDF_VERSION_1_4
possible PDF version (catalog)
|
static PdfName |
PDF_VERSION_1_5
possible PDF version (catalog)
|
static PdfName |
PDF_VERSION_1_6
possible PDF version (catalog)
|
static PdfName |
PDF_VERSION_1_7
possible PDF version (catalog)
|
static int |
PDFA1A
PDFA-1A level.
|
static int |
PDFA1B
PDFA-1B level.
|
static int |
PDFA2A
PDFA-2A level.
|
static int |
PDFA2B
PDFA-2B level.
|
static int |
PDFX1A2001
A PDF/X level.
|
static int |
PDFX32002
A PDF/X level.
|
static int |
PDFXNONE
A PDF/X level.
|
protected int |
prevxref
A number referring to the previous Cross-Reference Table.
|
static int |
PrintScalingNone
A viewer preference
|
protected com.aowagie.text.pdf.PdfPages |
root
The root of the page tree.
|
static char |
VERSION_1_2
possible PDF version (header)
|
static char |
VERSION_1_3
possible PDF version (header)
|
static char |
VERSION_1_4
possible PDF version (header)
|
static char |
VERSION_1_5
possible PDF version (header)
|
static char |
VERSION_1_6
possible PDF version (header)
|
static char |
VERSION_1_7
possible PDF version (header)
|
protected byte[] |
xmpMetadata
XMP Metadata for the document.
|
| Modifier | Constructor and Description |
|---|---|
protected |
PdfWriter()
Constructs a
PdfWriter. |
protected |
PdfWriter(com.aowagie.text.pdf.PdfDocument document,
OutputStream os)
Constructs a
PdfWriter. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(PdfAnnotation annot)
Use this methods to add a
PdfAnnotation or a PdfFormField
to the document. |
void |
addDeveloperExtension(PdfDeveloperExtension de)
Adds a developer extension to the Extensions dictionary
in the Catalog.
|
void |
addFileAttachment(String description,
byte[] fileStore,
String file,
String fileDisplay)
Use this method to add a file attachment at the document level.
|
protected void |
addSharedObjectsToBody() |
PdfIndirectObject |
addToBody(PdfObject object,
boolean inObjStm)
Use this method to add a PDF object to the PDF body.
|
PdfIndirectObject |
addToBody(PdfObject object,
PdfIndirectReference ref)
Use this method to add a PDF object to the PDF body.
|
void |
addViewerPreference(PdfName key,
PdfObject value)
Adds a viewer preference.
|
void |
close()
Signals that the
Document was closed and that no other
Elements will be added. |
void |
createXmpMetadata() |
protected void |
fillOCProperties(boolean erase) |
void |
freeReader(PdfReader reader)
Use this method to writes the reader to the document
and free the memory used by it.
|
PdfAcroForm |
getAcroForm()
Use this methods to get the AcroForm object.
|
protected PdfDictionary |
getCatalog(PdfIndirectReference rootObj) |
int |
getCompressionLevel()
Returns the compression level used for streams written by this writer.
|
int |
getCurrentDocumentSize()
Use this method to gets the current document size.
|
int |
getCurrentPageNumber() |
PdfDictionary |
getDefaultColorspace()
Use this method to get the default colorspaces.
|
PdfContentByte |
getDirectContent()
Use this method to get the direct content for this document.
|
PdfContentByte |
getDirectContentUnder()
Use this method to get the direct content under for this document.
|
PdfDictionary |
getExtraCatalog()
Sets extra keys to the catalog.
|
PdfDictionary |
getGroup()
Use this method to get the group dictionary.
|
PdfImportedPage |
getImportedPage(PdfReader reader,
int pageNumber)
Use this method to get a page from other PDF document.
|
PdfDictionary |
getInfo()
Use this method to get the info dictionary if you want to
change it directly (add keys and values to the info dictionary).
|
static PdfWriter |
getInstance(Document document,
OutputStream os)
Use this method to get an instance of the
PdfWriter. |
protected int |
getNewObjectNumber(PdfReader reader,
int number,
int generation) |
com.aowagie.text.pdf.PdfOCProperties |
getOCProperties()
Use this method to get the Optional Content Properties Dictionary.
|
PdfPageEvent |
getPageEvent()
Gets the
PdfPageEvent for this document or null
if none is set. |
int |
getPageNumber()
Gets the pagenumber of this document.
|
PdfIndirectReference |
getPageReference(int page)
Use this method to get a reference to a page existing or not.
|
Rectangle |
getPageSize()
Use this method to get the size of the media box.
|
PdfIndirectReference |
getPdfIndirectReference()
Use this to get an
PdfIndirectReference for an object that
will be created in the future. |
int |
getPDFXConformance()
Getter for the PDF/X Conformance value.
|
protected PdfIndirectReference |
getReferenceJBIG2Globals(byte[] content)
Gets an indirect reference to a JBIG2 Globals stream.
|
PdfOutline |
getRootOutline()
Use this method to get the root outline
and construct bookmarks.
|
int |
getRunDirection()
Use this method to set the run direction.
|
float |
getSpaceCharRatio()
Use this method to gets the space/character extra spacing ratio
for fully justified text.
|
com.aowagie.text.pdf.PdfStructureTreeRoot |
getStructureTreeRoot()
Gets the structure tree root.
|
PdfName |
getTabs()
Returns the value to be used for the Tabs entry in the page tree.
|
float |
getUserunit()
Use this method to get the user unit.
|
boolean |
isFullCompression()
Use this method to find out if 1.5 compression is on.
|
boolean |
isPdfX()
Checks if the PDF/X Conformance is necessary.
|
boolean |
isRgbTransparencyBlending()
Gets the transparency blending colorspace.
|
boolean |
isStrictImageSequence()
Use this method to get the strictImageSequence status.
|
boolean |
isTagged()
Check if the document is marked for tagging.
|
boolean |
isUserProperties()
Gets the flag indicating the presence of structure elements that contain user properties attributes.
|
void |
open()
Signals that the
Document has been opened and that
Elements can be added. |
void |
setAdditionalAction(PdfName actionType,
PdfAction action) |
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 |
setCollection(PdfCollection collection)
Use this method to add the Collection dictionary.
|
void |
setCompressionLevel(int compressionLevel)
Sets the compression level to be used for streams written by this writer.
|
void |
setCropBoxSize(Rectangle crop)
Use this method to set the crop box.
|
void |
setDuration(int seconds)
Sets the display duration for the page (for presentations)
|
void |
setEncryption(byte[] userPassword,
byte[] ownerPassword,
int permissions,
int encryptionType)
Sets the encryption options for this document.
|
void |
setEncryption(Certificate[] certs,
int[] permissions,
int encryptionType)
Sets the certificate encryption options for this document.
|
void |
setGroup(PdfDictionary group)
Use this method to set the group dictionary.
|
void |
setInitialLeading(float leading)
Sets the initial leading for the PDF document.
|
void |
setOpenAction(PdfAction action)
When the document opens this
action will be
invoked. |
void |
setOpenAction(String name)
When the document opens it will jump to the destination with
this name.
|
void |
setOutlines(List outlines)
Sets the bookmarks.
|
void |
setOutputIntents(String outputConditionIdentifier,
String outputCondition,
String registryName,
String info,
ICC_Profile colorProfile)
Sets the values of the output intent dictionary.
|
void |
setPageAction(PdfName actionType,
PdfAction action) |
void |
setPageEmpty(boolean pageEmpty)
Use this method to make sure a page is added,
even if it's empty.
|
void |
setPageEvent(PdfPageEvent event)
Sets the
PdfPageEvent for this document. |
void |
setPageLabels(com.aowagie.text.pdf.PdfPageLabels pageLabels)
Use this method to add page labels
|
void |
setPageXmpMetadata(byte[] xmpMetadata)
Use this method to set the XMP Metadata for each page.
|
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 |
setPDFXConformance(int pdfx)
Sets the PDF/X conformance level.
|
void |
setRgbTransparencyBlending(boolean rgbTransparencyBlending)
Sets the transparency blending colorspace to RGB.
|
void |
setRunDirection(int runDirection)
Use this method to set the run direction.
|
void |
setSigFlags(int f)
Use this method to set the signature flags.
|
void |
setSpaceCharRatio(float spaceCharRatio)
Use this method to set the ratio between the extra word spacing and
the extra character spacing when the text is fully justified.
|
void |
setStrictImageSequence(boolean strictImageSequence)
Use this method to set the image sequence, so that it follows
the text in strict order (or not).
|
void |
setTabs(PdfName tabs)
Sets the value for the Tabs entry in the page tree.
|
void |
setTagged()
Mark this document for tagging.
|
void |
setThumbnail(Image image)
Use this method to set the thumbnail image for the current page.
|
void |
setTransition(PdfTransition transition)
Sets the transition for the page
|
void |
setUserProperties(boolean userProperties)
Sets the flag indicating the presence of structure elements that contain user properties attributes.
|
void |
setUserunit(float userunit)
Use this method to set the user unit.
|
void |
setViewerPreferences(int preferences)
Sets the page layout and page mode preferences by ORing one or two of these constants.
|
void |
setXmpMetadata(byte[] xmpMetadata)
Use this method to set the XMP Metadata.
|
protected void |
writeOutlines(PdfDictionary catalog,
boolean namedAsNames) |
add, getISOBytes, isCloseStream, isPaused, newPage, resetFooter, resetHeader, resetPageCount, setCloseStream, setFooter, setHeader, setMarginMirroring, setMarginMirroringTopBottom, setMargins, setPageCount, setPageSizeprotected com.aowagie.text.pdf.PdfDocument pdf
protected com.aowagie.text.pdf.PdfWriter.PdfBody body
protected com.aowagie.text.pdf.PdfPages root
protected int prevxref
protected List newBookmarks
public static final char VERSION_1_2
public static final char VERSION_1_3
public static final char VERSION_1_4
public static final char VERSION_1_5
public static final char VERSION_1_6
public static final char VERSION_1_7
public static final PdfName PDF_VERSION_1_2
public static final PdfName PDF_VERSION_1_3
public static final PdfName PDF_VERSION_1_4
public static final PdfName PDF_VERSION_1_5
public static final PdfName PDF_VERSION_1_6
public static final PdfName PDF_VERSION_1_7
protected PdfVersionImp pdf_version
public static final int PageLayoutSinglePage
public static final int PageLayoutOneColumn
public static final int PageLayoutTwoColumnLeft
public static final int PageLayoutTwoColumnRight
public static final int PageLayoutTwoPageLeft
public static final int PageLayoutTwoPageRight
public static final int PageModeUseNone
public static final int PageModeUseOutlines
public static final int PageModeUseThumbs
public static final int PageModeFullScreen
public static final int PageModeUseOC
public static final int PageModeUseAttachments
public static final int HideToolbar
public static final int HideMenubar
public static final int HideWindowUI
public static final int FitWindow
public static final int CenterWindow
public static final int DisplayDocTitle
public static final int NonFullScreenPageModeUseNone
public static final int NonFullScreenPageModeUseOutlines
public static final int NonFullScreenPageModeUseThumbs
public static final int NonFullScreenPageModeUseOC
public static final int DirectionL2R
public static final int DirectionR2L
public static final int PrintScalingNone
protected byte[] xmpMetadata
public static final int PDFXNONE
public static final int PDFX1A2001
public static final int PDFX32002
public static final int PDFA1A
public static final int PDFA1B
public static final int PDFA2A
public static final int PDFA2B
protected com.aowagie.text.pdf.PdfEncryption crypto
protected boolean fullCompression
protected int compressionLevel
protected com.aowagie.text.pdf.PdfReaderInstance currentPdfReaderInstance
protected HashSet documentOCG
protected com.aowagie.text.pdf.PdfOCProperties OCProperties
protected PdfArray OCGRadioGroup
protected PdfArray OCGLocked
protected PdfWriter()
PdfWriter.protected PdfWriter(com.aowagie.text.pdf.PdfDocument document,
OutputStream os)
PdfWriter.
Remark: a PdfWriter can only be constructed by calling the method
getInstance(Document document, OutputStream os).
document - The PdfDocument that has to be writtenos - The OutputStream the writer has to write to.public static PdfWriter getInstance(Document document, OutputStream os) throws DocumentException
PdfWriter.document - The Document that has to be writtenos - The OutputStream the writer has to write to.PdfWriterDocumentException - on errorpublic PdfDictionary getInfo()
public void setInitialLeading(float leading)
throws DocumentException
leading - the initial leadingDocumentException - if you try setting the leading after the document was opened.public PdfContentByte getDirectContent()
public PdfContentByte getDirectContentUnder()
public PdfIndirectObject addToBody(PdfObject object, boolean inObjStm) throws IOException
object - object to addinObjStm - info about inObjStm propertyIOException - Exception with a IO errorpublic PdfIndirectObject addToBody(PdfObject object, PdfIndirectReference ref) throws IOException
object - object to addref - reference to addIOException - Exception with information about a IO errorpublic PdfIndirectReference getPdfIndirectReference()
PdfIndirectReference for an object that
will be created in the future.
Use this method only if you know what you're doing!PdfIndirectReferenceprotected PdfDictionary getCatalog(PdfIndirectReference rootObj)
public PdfDictionary getExtraCatalog()
public PdfIndirectReference getPageReference(int page)
page - the page number. The first page is 1public int getPageNumber()
public int getCurrentPageNumber()
public void setTabs(PdfName tabs)
tabs - Can be PdfName.R, PdfName.C or PdfName.S.
Since the Adobe Extensions Level 3, it can also be PdfName.A
or PdfName.Wpublic PdfName getTabs()
public void setPageEvent(PdfPageEvent event)
PdfPageEvent for this document.event - the PdfPageEvent for this documentpublic PdfPageEvent getPageEvent()
PdfPageEvent for this document or null
if none is set.PdfPageEvent for this document or null
if none is setpublic void open()
Document has been opened and that
Elements can be added.
When this method is called, the PDF-document header is written to the outputstream.
open in interface DocListeneropen in class DocWriterDocWriter.open()public void close()
Document was closed and that no other
Elements will be added.
The pages-tree is built and written to the outputstream. A Catalog is constructed, as well as an Info-object, the reference table is composed and everything is written to the outputstream embedded in a Trailer.
close in interface DocListenerclose in class DocWriterDocWriter.close()protected void addSharedObjectsToBody()
throws IOException
IOExceptionpublic PdfOutline getRootOutline()
public void setOutlines(List outlines)
SimpleBookmark.outlines - the bookmarks or null to remove anyprotected void writeOutlines(PdfDictionary catalog, boolean namedAsNames) throws IOException
IOExceptionpublic void setPdfVersion(char version)
PdfVersionsetPdfVersion in interface PdfVersionversion - a character representing the PDF versionPdfVersion.setPdfVersion(char)public void setAtLeastPdfVersion(char version)
PdfVersionsetAtLeastPdfVersion in interface PdfVersionversion - a character representing the PDF versionPdfVersion.setAtLeastPdfVersion(char)public void setPdfVersion(PdfName version)
PdfVersionsetPdfVersion in interface PdfVersionversion - the PDF name that will be used for the Version key in the catalogPdfVersion.setPdfVersion(com.aowagie.text.pdf.PdfName)public void addDeveloperExtension(PdfDeveloperExtension de)
PdfVersionaddDeveloperExtension in interface PdfVersionde - an object that contains the extensions prefix and dictionaryPdfVersion.addDeveloperExtension(com.aowagie.text.pdf.PdfDeveloperExtension)public void setViewerPreferences(int preferences)
PdfViewerPreferencesaddViewerPreference(key, value)
if you want to change the following preferences:
setViewerPreferences in interface PdfViewerPreferencespreferences - the viewer preferencesPdfViewerPreferences.setViewerPreferences(int)public void addViewerPreference(PdfName key, PdfObject value)
PdfViewerPreferencesaddViewerPreference in interface PdfViewerPreferenceskey - the name of the viewer preferencevalue - the value of the viewer preferencePdfViewerPreferences.addViewerPreference(com.aowagie.text.pdf.PdfName, com.aowagie.text.pdf.PdfObject)public void setPageLabels(com.aowagie.text.pdf.PdfPageLabels pageLabels)
pageLabels - the page labelspublic void addFileAttachment(String description, byte[] fileStore, String file, String fileDisplay) throws IOException
description - the file descriptionfileStore - an array with the file. If it's null
the file will be read from the diskfile - the path to the file. It will only be used if
fileStore is not nullfileDisplay - the actual file name stored in the pdfIOException - on errorpublic void setOpenAction(String name)
PdfDocumentActionssetOpenAction in interface PdfDocumentActionsname - the name of the destination to jump toPdfDocumentActions.setOpenAction(java.lang.String)public void setOpenAction(PdfAction action)
PdfDocumentActionsaction will be
invoked.setOpenAction in interface PdfDocumentActionsaction - the action to be invokedPdfDocumentActions.setOpenAction(com.aowagie.text.pdf.PdfAction)public void setAdditionalAction(PdfName actionType, PdfAction action) throws DocumentException
DocumentExceptionpublic void setCollection(PdfCollection collection)
collection - a dictionary of type PdfCollectionpublic PdfAcroForm getAcroForm()
PdfAnnotationsgetAcroForm in interface PdfAnnotationsPdfAnnotations.getAcroForm()public void addAnnotation(PdfAnnotation annot)
PdfAnnotationsPdfAnnotation or a PdfFormField
to the document. Only the top parent of a PdfFormField
needs to be added.addAnnotation in interface PdfAnnotationsannot - the PdfAnnotation or the PdfFormField to addPdfAnnotations.addAnnotation(com.aowagie.text.pdf.PdfAnnotation)public void setSigFlags(int f)
PdfAnnotationssetSigFlags in interface PdfAnnotationsf - the flags. This flags are ORed with current onesPdfAnnotations.setSigFlags(int)public void setXmpMetadata(byte[] xmpMetadata)
xmpMetadata - The xmpMetadata to set.public void setPageXmpMetadata(byte[] xmpMetadata)
xmpMetadata - The xmpMetadata to set.public void createXmpMetadata()
public void setPDFXConformance(int pdfx)
PdfXConformancesetPDFXConformance in interface PdfXConformancepdfx - the conformance levelPdfXConformance.setPDFXConformance(int)public int getPDFXConformance()
PdfXConformancegetPDFXConformance in interface PdfXConformancePdfXConformance.getPDFXConformance()public boolean isPdfX()
PdfXConformanceisPdfX in interface PdfXConformancePdfXConformance.isPdfX()public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) throws IOException
outputConditionIdentifier - a valueoutputCondition - a value, "PDFA/A" to force GTS_PDFA1, otherwise cued by pdfxConformance.registryName - a valueinfo - a valuecolorProfile - a valueIOException - on errorpublic void setEncryption(byte[] userPassword,
byte[] ownerPassword,
int permissions,
int encryptionType)
throws DocumentException
PdfEncryptionSettingssetEncryption in interface PdfEncryptionSettingsuserPassword - the user password. Can be null or emptyownerPassword - the owner password. Can be null or emptypermissions - the user permissionsencryptionType - the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.
Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartextDocumentException - if the document is already openPdfEncryptionSettings.setEncryption(byte[], byte[], int, int)public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException
PdfEncryptionSettingssetEncryption in interface PdfEncryptionSettingscerts - the public certificates to be used for the encryptionpermissions - the user permissions for each of the certificatesencryptionType - the type of encryption. It can be one of STANDARD_ENCRYPTION_40, STANDARD_ENCRYPTION_128 or ENCRYPTION_AES128.DocumentException - if the document is already openPdfEncryptionSettings.setEncryption(java.security.cert.Certificate[], int[], int)public boolean isFullCompression()
public int getCompressionLevel()
public void setCompressionLevel(int compressionLevel)
compressionLevel - a value between 0 (best speed) and 9 (best compression)public PdfImportedPage getImportedPage(PdfReader reader, int pageNumber)
reader - the PDF document where the page ispageNumber - the page number. The first page is 1public void freeReader(PdfReader reader) throws IOException
reader - the PdfReader to freeIOException - on errorpublic int getCurrentDocumentSize()
freeReader()
when concatenating many documents and an idea of
the current size is needed.protected int getNewObjectNumber(PdfReader reader, int number, int generation)
public void setTagged()
public boolean isTagged()
true if the document is marked for taggingpublic com.aowagie.text.pdf.PdfStructureTreeRoot getStructureTreeRoot()
null.public com.aowagie.text.pdf.PdfOCProperties getOCProperties()
protected void fillOCProperties(boolean erase)
public Rectangle getPageSize()
public void setCropBoxSize(Rectangle crop)
crop - the crop boxpublic void setPageEmpty(boolean pageEmpty)
pageEmpty - the statepublic void setPageAction(PdfName actionType, PdfAction action) throws DocumentException
DocumentExceptionpublic void setDuration(int seconds)
PdfPageActionssetDuration in interface PdfPageActionsseconds - the number of seconds to display the pagePdfPageActions.setDuration(int)public void setTransition(PdfTransition transition)
PdfPageActionssetTransition in interface PdfPageActionstransition - the Transition objectPdfPageActions.setTransition(com.aowagie.text.pdf.PdfTransition)public void setThumbnail(Image image) throws com.aowagie.text.pdf.PdfException, DocumentException
image - the imagePdfException - on errorDocumentException - or errorpublic PdfDictionary getGroup()
public void setGroup(PdfDictionary group)
group - New value of property group.public float getSpaceCharRatio()
public void setSpaceCharRatio(float spaceCharRatio)
spaceCharRatio times more
than extra character spacing. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO
then the extra character spacing will be zero.spaceCharRatio - the ratio between the extra word spacing and the extra character spacingpublic void setRunDirection(int runDirection)
setRunDirection in interface PdfRunDirectionrunDirection - the run directionpublic int getRunDirection()
getRunDirection in interface PdfRunDirectionpublic float getUserunit()
public void setUserunit(float userunit)
throws DocumentException
userunit - The userunit to set.DocumentException - on errorpublic PdfDictionary getDefaultColorspace()
public boolean isStrictImageSequence()
public void setStrictImageSequence(boolean strictImageSequence)
strictImageSequence - new value of property strictImageSequenceprotected PdfIndirectReference getReferenceJBIG2Globals(byte[] content)
content - a byte array that may already been added to the writer inside a stream object.public boolean isUserProperties()
public void setUserProperties(boolean userProperties)
userProperties - the user properties flagpublic boolean isRgbTransparencyBlending()
true if the transparency blending colorspace is RGB, false
if it is the default blending colorspacepublic void setRgbTransparencyBlending(boolean rgbTransparencyBlending)
rgbTransparencyBlending - true to set the transparency blending colorspace to RGB, false
to use the default blending colorspaceCopyright © 2021. All rights reserved.