- All Implemented Interfaces:
DocListener,ElementListener,PdfAnnotations,PdfDocumentActions,PdfEncryptionSettings,PdfPageActions,PdfRunDirection,PdfVersion,PdfViewerPreferences,PdfXConformance,AutoCloseable,EventListener
- Direct Known Subclasses:
PdfCopy
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.This class generates the structure of a PDF document. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordstatic final intDeprecated.The operation permitted when the document is opened with the user passwordprotected PdfWriter.PdfBodyDeprecated.body of the PDF documentstatic final intDeprecated.A viewer preferenceprotected intDeprecated.The color number counter for the colors in the document.protected intDeprecated.The compression level of the content streams.protected PdfEncryptionDeprecated.Contains the business logic for cryptography.protected intDeprecated.The current page number.protected com.lowagie.text.pdf.PdfReaderInstanceDeprecated.protected PdfDictionaryDeprecated.static final PdfNameDeprecated.action valuestatic final PdfNameDeprecated.action valueprotected PdfContentByteDeprecated.The direct content in this document.protected PdfContentByteDeprecated.The direct content under in this document.static final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.Add this to the mode to keep the metadata in clear textstatic final PdfNameDeprecated.action valueprotected HashMap<PdfSpotColor, com.lowagie.text.pdf.ColorDetails> Deprecated.The colors of this documentprotected HashMap<PdfDictionary, PdfObject[]> Deprecated.protected LinkedHashMap<BaseFont, com.lowagie.text.pdf.FontDetails> Deprecated.The fonts of this documentDeprecated.A hashSet containing all the PdfLayer objects.Deprecated.An array list used to define the order of an OCG tree.protected HashMap<PdfPatternPainter, PdfName> Deprecated.The patterns of this documentDeprecated.protected HashMap<PdfShadingPattern, Object> Deprecated.protected HashMap<PdfShading, Object> Deprecated.protected HashMap<com.lowagie.text.pdf.ColorDetails, com.lowagie.text.pdf.ColorDetails> Deprecated.static final intDeprecated.Add this to the mode to keep encrypt only the embedded files.static final intDeprecated.Type of encryptionstatic final intDeprecated.Type of encryptionstatic final intDeprecated.No encryptionprotected PdfDictionaryDeprecated.Holds value of property extraCatalog this is used for Output Intents.static final intDeprecated.A viewer preferenceprotected intDeprecated.The font number counter for the fonts in the document.protected LinkedHashMap<PdfIndirectReference, Object[]> Deprecated.The form XObjects in this document.protected intDeprecated.The name counter for the form XObjects name.protected booleanDeprecated.Holds value of property fullCompression.static final intDeprecated.The highest generation number possible.protected PdfDictionaryDeprecated.A group attributes dictionary specifying the attributes of the page's page group for use in the transparent imaging modelstatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferenceprotected PdfDictionaryDeprecated.Dictionary, containing all the images of the PDF documentDeprecated.protected HashMap<PdfStream, PdfIndirectReference> Deprecated.A HashSet with Stream objects containing JBIG2 Globalsprotected ListDeprecated.static final floatDeprecated.Disable the inter-character spacing.static final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferenceprotected PdfArrayDeprecated.The locked array in an OCG dictionaryprotected PdfArrayDeprecated.The RBGroups array in an OCG dictionaryprotected PdfOCPropertiesDeprecated.The OCProperties in a catalog dictionary.static final PdfNameDeprecated.action valuestatic final PdfNameDeprecated.action valuestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferencestatic final intDeprecated.A viewer preferenceprotected ArrayList<PdfIndirectReference> Deprecated.The PdfIndirectReference to the pages.protected com.lowagie.text.pdf.ColorDetailsDeprecated.protected com.lowagie.text.pdf.ColorDetailsDeprecated.protected com.lowagie.text.pdf.ColorDetailsDeprecated.protected intDeprecated.The pattern number counter for the colors in the document.protected PdfDocumentDeprecated.the pdfdocument object.protected PdfVersionImpDeprecated.Stores the version information for the header and the catalog.static final PdfNameDeprecated.possible PDF version (catalog)static final PdfNameDeprecated.possible PDF version (catalog)static final PdfNameDeprecated.possible PDF version (catalog)static final PdfNameDeprecated.possible PDF version (catalog)static final PdfNameDeprecated.possible PDF version (catalog)static final PdfNameDeprecated.possible PDF version (catalog)static final intDeprecated.PDFA-1A level.static final intDeprecated.PDFA-1B level.static final intDeprecated.A PDF/X level.static final intDeprecated.A PDF/X level.static final intDeprecated.A PDF/X level.protected intDeprecated.A number referring to the previous Cross-Reference Table.static final intDeprecated.A viewer preferenceprotected PdfPagesDeprecated.The root of the page tree.static final intDeprecated.Use the default run direction.static final intDeprecated.Use bidirectional reordering with left-to-right preferential run direction.static final intDeprecated.Do not use bidirectional reordering.static final intDeprecated.Use bidirectional reordering with right-to-left preferential run direction.protected intDeprecated.static final intDeprecated.signature valuestatic final intDeprecated.signature valuestatic final floatDeprecated.The default space-char ratio.static final intDeprecated.Type of encryptionstatic final intDeprecated.Type of encryptionprotected PdfStructureTreeRootDeprecated.protected PdfNameDeprecated.The value of the Tabs entry in the page dictionary.protected booleanDeprecated.protected floatDeprecated.static final charDeprecated.possible PDF version (header)static final charDeprecated.possible PDF version (header)static final charDeprecated.possible PDF version (header)static final charDeprecated.possible PDF version (header)static final charDeprecated.possible PDF version (header)static final charDeprecated.possible PDF version (header)static final PdfNameDeprecated.action valuestatic final PdfNameDeprecated.action valueprotected byte[]Deprecated.XMP Metadata for the document. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Constructs aPdfWriter.protectedPdfWriter(PdfDocument document, OutputStream os) Deprecated.Constructs aPdfWriter. -
Method Summary
Modifier and TypeMethodDescriptionprotected PdfIndirectReferenceadd(PdfICCBased icc) Deprecated.voidaddAnnotation(PdfAnnotation annot) Deprecated.Use this methods to add aPdfAnnotationor aPdfFormFieldto the document.voidaddCalculationOrder(PdfFormField annot) Deprecated.Use this method to adds thePdfAnnotationto the calculation order array.voidDeprecated.Adds a developer extension to the Extensions dictionary in the Catalog.addDirectImageSimple(Image image) Deprecated.Use this method to adds an image to the document but not to the page resources.addDirectImageSimple(Image image, PdfIndirectReference fixedRef) Deprecated.Adds an image to the document but not to the page resources.voidDeprecated.Use this method to add a file attachment at the document level.voidaddFileAttachment(String description, byte[] fileStore, String file, String fileDisplay) Deprecated.Use this method to add a file attachment at the document level.voidaddFileAttachment(String description, PdfFileSpecification fs) Deprecated.Use this method to add a file attachment at the document level.voidDeprecated.Use this method to add a JavaScript action at the document level.voidaddJavaScript(String code) Deprecated.Use this method to adds a JavaScript action at the document level.voidaddJavaScript(String code, boolean unicode) Deprecated.Use this method to add a JavaScript action at the document level.voidaddJavaScript(String name, PdfAction js) Deprecated.Use this method to add a JavaScript action at the document level.voidaddJavaScript(String name, String code) Deprecated.Use this method to adds a JavaScript action at the document level.voidaddJavaScript(String name, String code, boolean unicode) Deprecated.Use this method to add a JavaScript action at the document level.voidaddNamedDestination(String name, int page, PdfDestination dest) Deprecated.Adds one named destination.voidaddNamedDestinations(Map<String, String> map, int page_offset) Deprecated.Adds named destinations in bulk.voidaddOCGRadioGroup(List<PdfLayer> group) Deprecated.Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm.protected voidDeprecated.Deprecated.Use this method to add a PDF object to the PDF body.Deprecated.Use this method to add a PDF object to the PDF body.Deprecated.Use this method to add a PDF object to the PDF body.Deprecated.Use this method to add a PDF object to the PDF body.addToBody(PdfObject object, PdfIndirectReference ref) Deprecated.Use this method to add a PDF object to the PDF body.addToBody(PdfObject object, PdfIndirectReference ref, boolean inObjStm) Deprecated.Use this method to add a PDF object to the PDF body.voidaddViewerPreference(PdfName key, PdfObject value) Deprecated.Adds a viewer preference.voidDeprecated.Use this method to clear text wrapping around images (if applicable).voidclose()Deprecated.Signals that theDocumentwas closed and that no otherElementswill be added.voidDeprecated.Use this method to creates XMP Metadata based on the metadata in the PdfDocument.protected voidfillOCProperties(boolean erase) Deprecated.booleanDeprecated.Checks if aTablefits the current page of thePdfDocument.booleanDeprecated.Checks if aTablefits the current page of thePdfDocument.voidfreeReader(PdfReader reader) Deprecated.Use this method to writes the reader to the document and free the memory used by it.Deprecated.Use this methods to get the AcroForm object.getBoxSize(String boxName) Deprecated.Use this method to get the size of a trim, art, crop or bleed box, or null if not defined.protected PdfDictionarygetCatalog(PdfIndirectReference rootObj) Deprecated.intDeprecated.Returns the compression level used for streams written by this writer.longDeprecated.Use this method to gets the current document size.Deprecated.Retrieves a reference to the current page of the document.intDeprecated.Returns the number of the current page in the document.Deprecated.Use this method to get the default colorspaces.Deprecated.Use this method to get the direct content for this document.Deprecated.Use this method to get the direct content under for this document.Deprecated.Sets extra keys to the catalog.getGroup()Deprecated.Use this method to get the group dictionary.getImportedPage(PdfReader reader, int pageNumber) Deprecated.Use this method to get a page from other PDF document.getInfo()Deprecated.Use this method to get the info dictionary if you want to change it directly (add keys and values to the info dictionary).static PdfWritergetInstance(Document document, OutputStream os) Deprecated.Use this method to get an instance of thePdfWriter.static PdfWritergetInstance(Document document, OutputStream os, DocListener listener) Deprecated.Use this method to get an instance of thePdfWriter.protected intgetNewObjectNumber(PdfReader reader, int number, int generation) Deprecated.Deprecated.Use this method to get the Optional Content Properties Dictionary.Deprecated.Gets thePdfPageEventfor this document ornullif none is set.intDeprecated.Gets the pagenumber of this document.getPageReference(int page) Deprecated.Use this method to get a reference to a page existing or not.Deprecated.Use this method to get the size of the media box.Deprecated.Use this to get anPdfIndirectReferencefor an object that will be created in the future.intDeprecated.Getter for the PDF/X Conformance value.protected PdfIndirectReferencegetReferenceJBIG2Globals(byte[] content) Deprecated.Gets an indirect reference to a JBIG2 Globals stream.Deprecated.Use this method to get the root outline and construct bookmarks.intDeprecated.Use this method to set the run direction.floatDeprecated.Use this method to gets the space/character extra spacing ratio for fully justified text.Deprecated.Gets the structure tree root.getTabs()Deprecated.Returns the value to be used for the Tabs entry in the page tree.floatDeprecated.Use this method to get the user unit.floatgetVerticalPosition(boolean ensureNewLine) Deprecated.Use this method to get the current vertical page position.booleanDeprecated.Use this method to find out if 1.5 compression is on.booleanDeprecated.Checks if a newPage() will actually generate a new page.booleanisPdfA1()Deprecated.booleanisPdfX()Deprecated.Checks if the PDF/X Conformance is necessary.booleanDeprecated.Gets the transparency blending colorspace.booleanDeprecated.Use this method to get the strictImageSequence status.booleanisTagged()Deprecated.Check if the document is marked for tagging.booleanDeprecated.Gets the flag indicating the presence of structure elements that contain user properties attributes.voidDeprecated.Use this method to lock an optional content group.voidopen()Deprecated.Signals that theDocumenthas been opened and thatElementscan be added.voidDeprecated.Use this method to releases the memory used by a template.intreorderPages(int[] order) Deprecated.Use this method to reorder the pages in the document.voidsetAdditionalAction(PdfName actionType, PdfAction action) Deprecated.Additional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole.voidsetAtLeastPdfVersion(char version) Deprecated.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.voidsetBoxSize(String boxName, Rectangle size) Deprecated.Use this method to set the page box sizes.voidsetCollection(PdfCollection collection) Deprecated.Use this method to add the Collection dictionary.voidsetCompressionLevel(int compressionLevel) Deprecated.Sets the compression level to be used for streams written by this writer.voidsetCropBoxSize(Rectangle crop) Deprecated.Use this method to set the crop box.voidsetDefaultColorspace(PdfName key, PdfObject cs) Deprecated.Use this method to sets the default colorspace that will be applied to all the document.voidsetDuration(int seconds) Deprecated.Sets the display duration for the page (for presentations)voidsetEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) Deprecated.Sets the encryption options for this document.voidsetEncryption(Certificate[] certs, int[] permissions, int encryptionType) Deprecated.Sets the certificate encryption options for this document.voidDeprecated.Use this method to set the document's compression to the PDF 1.5 mode with object streams and xref streams.voidsetGroup(PdfDictionary group) Deprecated.Use this method to set the group dictionary.voidsetInitialLeading(float leading) Deprecated.Sets the initial leading for the PDF document.voidDeprecated.Use this method to make sure the page tree has a linear structure (every leave is attached directly to the root).voidsetOpenAction(PdfAction action) Deprecated.When the document opens thisactionwill be invoked.voidsetOpenAction(String name) Deprecated.When the document opens it will jump to the destination with this name.voidsetOutlines(List outlines) Deprecated.Sets the bookmarks.booleansetOutputIntents(PdfReader reader, boolean checkExistence) Deprecated.Use this method to copy the output intent dictionary from another document to this one.voidsetOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] destOutputProfile) Deprecated.Sets the values of the output intent dictionary.voidsetOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) Deprecated.Sets the values of the output intent dictionary.voidsetPageAction(PdfName actionType, PdfAction action) Deprecated.Sets the open and close page additional action.voidsetPageEmpty(boolean pageEmpty) Deprecated.Use this method to make sure a page is added, even if it's empty.voidsetPageEvent(PdfPageEvent event) Deprecated.Sets thePdfPageEventfor this document.voidsetPageLabels(PdfPageLabels pageLabels) Deprecated.Use this method to add page labelsvoidsetPageXmpMetadata(byte[] xmpMetadata) Deprecated.Use this method to set the XMP Metadata for each page.voidsetPdfVersion(char version) Deprecated.If the PDF Header hasn't been written yet, this changes the version as it will appear in the PDF Header.voidsetPdfVersion(PdfName version) Deprecated.Sets the PDF version as it will appear in the Catalog.voidsetPDFXConformance(int pdfx) Deprecated.Sets the PDF/X conformance level.voidsetRgbTransparencyBlending(boolean rgbTransparencyBlending) Deprecated.Sets the transparency blending colorspace to RGB.voidsetRunDirection(int runDirection) Deprecated.Use this method to set the run direction.voidsetSigFlags(int f) Deprecated.Use this method to set the signature flags.voidsetSpaceCharRatio(float spaceCharRatio) Deprecated.Use this method to set the ratio between the extra word spacing and the extra character spacing when the text is fully justified.voidsetStrictImageSequence(boolean strictImageSequence) Deprecated.Use this method to set the image sequence, so that it follows the text in strict order (or not).voidDeprecated.Sets the value for the Tabs entry in the page tree.voidDeprecated.Mark this document for tagging.voidsetThumbnail(Image image) Deprecated.Use this method to set the thumbnail image for the current page.voidsetTransition(PdfTransition transition) Deprecated.Sets the transition for the pagevoidsetUserProperties(boolean userProperties) Deprecated.Sets the flag indicating the presence of structure elements that contain user properties attributes.voidsetUserunit(float userunit) Deprecated.Use this method to set the user unit.voidsetViewerPreferences(int preferences) Deprecated.Sets the page layout and page mode preferences by ORing one or two of these constants.voidsetXmpMetadata(byte[] xmpMetadata) Deprecated.Use this method to set the XMP Metadata.protected voidwriteOutlines(PdfDictionary catalog, boolean namedAsNames) Deprecated.Methods inherited from class com.lowagie.text.DocWriter
add, addTabs, flush, getISOBytes, isCloseStream, isPaused, newPage, pause, resetFooter, resetHeader, resetPageCount, resume, setCloseStream, setFooter, setHeader, setMarginMirroring, setMarginMirroringTopBottom, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart
-
Field Details
-
GENERATION_MAX
public static final int GENERATION_MAXDeprecated.The highest generation number possible.- Since:
- iText 2.1.6
- See Also:
-
VERSION_1_2
public static final char VERSION_1_2Deprecated.possible PDF version (header)- See Also:
-
VERSION_1_3
public static final char VERSION_1_3Deprecated.possible PDF version (header)- See Also:
-
VERSION_1_4
public static final char VERSION_1_4Deprecated.possible PDF version (header)- See Also:
-
VERSION_1_5
public static final char VERSION_1_5Deprecated.possible PDF version (header)- See Also:
-
VERSION_1_6
public static final char VERSION_1_6Deprecated.possible PDF version (header)- See Also:
-
VERSION_1_7
public static final char VERSION_1_7Deprecated.possible PDF version (header)- See Also:
-
PDF_VERSION_1_2
Deprecated.possible PDF version (catalog) -
PDF_VERSION_1_3
Deprecated.possible PDF version (catalog) -
PDF_VERSION_1_4
Deprecated.possible PDF version (catalog) -
PDF_VERSION_1_5
Deprecated.possible PDF version (catalog) -
PDF_VERSION_1_6
Deprecated.possible PDF version (catalog) -
PDF_VERSION_1_7
Deprecated.possible PDF version (catalog) -
PageLayoutSinglePage
public static final int PageLayoutSinglePageDeprecated.A viewer preference- See Also:
-
PageLayoutOneColumn
public static final int PageLayoutOneColumnDeprecated.A viewer preference- See Also:
-
PageLayoutTwoColumnLeft
public static final int PageLayoutTwoColumnLeftDeprecated.A viewer preference- See Also:
-
PageLayoutTwoColumnRight
public static final int PageLayoutTwoColumnRightDeprecated.A viewer preference- See Also:
-
PageLayoutTwoPageLeft
public static final int PageLayoutTwoPageLeftDeprecated.A viewer preference- See Also:
-
PageLayoutTwoPageRight
public static final int PageLayoutTwoPageRightDeprecated.A viewer preference- See Also:
-
PageModeUseNone
public static final int PageModeUseNoneDeprecated.A viewer preference- See Also:
-
PageModeUseOutlines
public static final int PageModeUseOutlinesDeprecated.A viewer preference- See Also:
-
PageModeUseThumbs
public static final int PageModeUseThumbsDeprecated.A viewer preference- See Also:
-
PageModeFullScreen
public static final int PageModeFullScreenDeprecated.A viewer preference- See Also:
-
PageModeUseOC
public static final int PageModeUseOCDeprecated.A viewer preference- See Also:
-
PageModeUseAttachments
public static final int PageModeUseAttachmentsDeprecated.A viewer preference- See Also:
-
HideToolbar
public static final int HideToolbarDeprecated.A viewer preference- See Also:
-
HideMenubar
public static final int HideMenubarDeprecated.A viewer preference- See Also:
-
HideWindowUI
public static final int HideWindowUIDeprecated.A viewer preference- See Also:
-
FitWindow
public static final int FitWindowDeprecated.A viewer preference- See Also:
-
CenterWindow
public static final int CenterWindowDeprecated.A viewer preference- See Also:
-
DisplayDocTitle
public static final int DisplayDocTitleDeprecated.A viewer preference- See Also:
-
NonFullScreenPageModeUseNone
public static final int NonFullScreenPageModeUseNoneDeprecated.A viewer preference- See Also:
-
NonFullScreenPageModeUseOutlines
public static final int NonFullScreenPageModeUseOutlinesDeprecated.A viewer preference- See Also:
-
NonFullScreenPageModeUseThumbs
public static final int NonFullScreenPageModeUseThumbsDeprecated.A viewer preference- See Also:
-
NonFullScreenPageModeUseOC
public static final int NonFullScreenPageModeUseOCDeprecated.A viewer preference- See Also:
-
DirectionL2R
public static final int DirectionL2RDeprecated.A viewer preference- See Also:
-
DirectionR2L
public static final int DirectionR2LDeprecated.A viewer preference- See Also:
-
PrintScalingNone
public static final int PrintScalingNoneDeprecated.A viewer preference- See Also:
-
DOCUMENT_CLOSE
Deprecated.action value -
WILL_SAVE
Deprecated.action value -
DID_SAVE
Deprecated.action value -
WILL_PRINT
Deprecated.action value -
DID_PRINT
Deprecated.action value -
SIGNATURE_EXISTS
public static final int SIGNATURE_EXISTSDeprecated.signature value- See Also:
-
SIGNATURE_APPEND_ONLY
public static final int SIGNATURE_APPEND_ONLYDeprecated.signature value- See Also:
-
PDFXNONE
public static final int PDFXNONEDeprecated.A PDF/X level.- See Also:
-
PDFX1A2001
public static final int PDFX1A2001Deprecated.A PDF/X level.- See Also:
-
PDFX32002
public static final int PDFX32002Deprecated.A PDF/X level.- See Also:
-
PDFA1A
public static final int PDFA1ADeprecated.PDFA-1A level.- See Also:
-
PDFA1B
public static final int PDFA1BDeprecated.PDFA-1B level.- See Also:
-
ENCRYPTION_NONE
public static final int ENCRYPTION_NONEDeprecated.No encryption- See Also:
-
STANDARD_ENCRYPTION_40
public static final int STANDARD_ENCRYPTION_40Deprecated.Type of encryption- See Also:
-
STANDARD_ENCRYPTION_128
public static final int STANDARD_ENCRYPTION_128Deprecated.Type of encryption- See Also:
-
ENCRYPTION_AES_128
public static final int ENCRYPTION_AES_128Deprecated.Type of encryption- See Also:
-
ENCRYPTION_AES_256_V3
public static final int ENCRYPTION_AES_256_V3Deprecated.Type of encryption- See Also:
-
DO_NOT_ENCRYPT_METADATA
public static final int DO_NOT_ENCRYPT_METADATADeprecated.Add this to the mode to keep the metadata in clear text- See Also:
-
EMBEDDED_FILES_ONLY
public static final int EMBEDDED_FILES_ONLYDeprecated.Add this to the mode to keep encrypt only the embedded files.- Since:
- 2.1.3
- See Also:
-
ALLOW_PRINTING
public static final int ALLOW_PRINTINGDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_MODIFY_CONTENTS
public static final int ALLOW_MODIFY_CONTENTSDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_COPY
public static final int ALLOW_COPYDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_MODIFY_ANNOTATIONS
public static final int ALLOW_MODIFY_ANNOTATIONSDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_FILL_IN
public static final int ALLOW_FILL_INDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_SCREENREADERS
public static final int ALLOW_SCREENREADERSDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_ASSEMBLY
public static final int ALLOW_ASSEMBLYDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
ALLOW_DEGRADED_PRINTING
public static final int ALLOW_DEGRADED_PRINTINGDeprecated.The operation permitted when the document is opened with the user password- Since:
- 2.0.7
- See Also:
-
PAGE_OPEN
Deprecated.action value -
PAGE_CLOSE
Deprecated.action value -
SPACE_CHAR_RATIO_DEFAULT
public static final float SPACE_CHAR_RATIO_DEFAULTDeprecated.The default space-char ratio.- See Also:
-
NO_SPACE_CHAR_RATIO
public static final float NO_SPACE_CHAR_RATIODeprecated.Disable the inter-character spacing.- See Also:
-
RUN_DIRECTION_DEFAULT
public static final int RUN_DIRECTION_DEFAULTDeprecated.Use the default run direction.- See Also:
-
RUN_DIRECTION_NO_BIDI
public static final int RUN_DIRECTION_NO_BIDIDeprecated.Do not use bidirectional reordering.- See Also:
-
RUN_DIRECTION_LTR
public static final int RUN_DIRECTION_LTRDeprecated.Use bidirectional reordering with left-to-right preferential run direction.- See Also:
-
RUN_DIRECTION_RTL
public static final int RUN_DIRECTION_RTLDeprecated.Use bidirectional reordering with right-to-left preferential run direction.- See Also:
-
pdf
Deprecated.the pdfdocument object. -
directContent
Deprecated.The direct content in this document. -
directContentUnder
Deprecated.The direct content under in this document. -
body
Deprecated.body of the PDF document -
extraCatalog
Deprecated.Holds value of property extraCatalog this is used for Output Intents. -
root
Deprecated.The root of the page tree. -
pageReferences
Deprecated.The PdfIndirectReference to the pages. -
currentPageNumber
protected int currentPageNumberDeprecated.The current page number. -
tabs
Deprecated.The value of the Tabs entry in the page dictionary.- Since:
- 2.1.5
-
prevxref
protected int prevxrefDeprecated.A number referring to the previous Cross-Reference Table. -
newBookmarks
Deprecated. -
pdf_version
Deprecated.Stores the version information for the header and the catalog. -
xmpMetadata
protected byte[] xmpMetadataDeprecated.XMP Metadata for the document. -
crypto
Deprecated.Contains the business logic for cryptography. -
fullCompression
protected boolean fullCompressionDeprecated.Holds value of property fullCompression. -
compressionLevel
protected int compressionLevelDeprecated.The compression level of the content streams.- Since:
- 2.1.3
-
documentFonts
Deprecated.The fonts of this document -
fontNumber
protected int fontNumberDeprecated.The font number counter for the fonts in the document. -
formXObjects
Deprecated.The form XObjects in this document. The key is the xref and the value is Object[]{PdfName, template}. -
formXObjectsCounter
protected int formXObjectsCounterDeprecated.The name counter for the form XObjects name. -
importedPages
Deprecated. -
currentPdfReaderInstance
protected com.lowagie.text.pdf.PdfReaderInstance currentPdfReaderInstanceDeprecated. -
documentColors
Deprecated.The colors of this document -
colorNumber
protected int colorNumberDeprecated.The color number counter for the colors in the document. -
documentPatterns
Deprecated.The patterns of this document -
patternNumber
protected int patternNumberDeprecated.The pattern number counter for the colors in the document. -
documentShadingPatterns
Deprecated. -
documentShadings
Deprecated. -
documentExtGState
Deprecated. -
documentProperties
Deprecated. -
tagged
protected boolean taggedDeprecated. -
structureTreeRoot
Deprecated. -
documentOCG
Deprecated.A hashSet containing all the PdfLayer objects. -
documentOCGorder
Deprecated.An array list used to define the order of an OCG tree. -
OCProperties
Deprecated.The OCProperties in a catalog dictionary. -
OCGRadioGroup
Deprecated.The RBGroups array in an OCG dictionary -
OCGLocked
Deprecated.The locked array in an OCG dictionary- Since:
- 2.1.2
-
group
Deprecated.A group attributes dictionary specifying the attributes of the page's page group for use in the transparent imaging model -
runDirection
protected int runDirectionDeprecated. -
userunit
protected float userunitDeprecated. -
defaultColorspace
Deprecated. -
documentSpotPatterns
protected HashMap<com.lowagie.text.pdf.ColorDetails,com.lowagie.text.pdf.ColorDetails> documentSpotPatternsDeprecated. -
patternColorspaceRGB
protected com.lowagie.text.pdf.ColorDetails patternColorspaceRGBDeprecated. -
patternColorspaceGRAY
protected com.lowagie.text.pdf.ColorDetails patternColorspaceGRAYDeprecated. -
patternColorspaceCMYK
protected com.lowagie.text.pdf.ColorDetails patternColorspaceCMYKDeprecated. -
imageDictionary
Deprecated.Dictionary, containing all the images of the PDF document -
JBIG2Globals
Deprecated.A HashSet with Stream objects containing JBIG2 Globals- Since:
- 2.1.5
-
-
Constructor Details
-
PdfWriter
protected PdfWriter()Deprecated.Constructs aPdfWriter. -
PdfWriter
Deprecated.Constructs aPdfWriter.Remark: a PdfWriter can only be constructed by calling the method
getInstance(Document document, OutputStream os).- Parameters:
document- ThePdfDocumentthat has to be writtenos- TheOutputStreamthe writer has to write to.
-
-
Method Details
-
getInstance
Deprecated.Use this method to get an instance of thePdfWriter.- Parameters:
document- TheDocumentthat has to be writtenos- TheOutputStreamthe writer has to write to.- Returns:
- a new
PdfWriter - Throws:
DocumentException- on error
-
getInstance
public static PdfWriter getInstance(Document document, OutputStream os, DocListener listener) throws DocumentException Deprecated.Use this method to get an instance of thePdfWriter.- Parameters:
document- TheDocumentthat has to be writtenos- TheOutputStreamthe writer has to write to.listener- ADocListenerto pass to the PdfDocument.- Returns:
- a new
PdfWriter - Throws:
DocumentException- on error
-
getInfo
Deprecated.Use this method to get the info dictionary if you want to change it directly (add keys and values to the info dictionary).- Returns:
- the info dictionary
-
getVerticalPosition
public float getVerticalPosition(boolean ensureNewLine) Deprecated.Use this method to get the current vertical page position.- Parameters:
ensureNewLine- Tells whether a new line shall be enforced. This may cause side effects for elements that do not terminate the lines they've started because those lines will get terminated.- Returns:
- The current vertical page position.
-
setInitialLeading
Deprecated.Sets the initial leading for the PDF document. This has to be done before the document is opened.- Parameters:
leading- the initial leading- Throws:
DocumentException- if you try setting the leading after the document was opened.- Since:
- 2.1.6
-
getDirectContent
Deprecated.Use this method to get the direct content for this document. There is only one direct content, multiple calls to this method will allways retrieve the same object.- Returns:
- the direct content
-
getDirectContentUnder
Deprecated.Use this method to get the direct content under for this document. There is only one direct content, multiple calls to this method will always retrieve the same object.- Returns:
- the direct content
-
addToBody
Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the PDF object to add- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
addToBody
Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the PDF object to addinObjStm- a boolean- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
addToBody
Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the object to addref- the IndirectReference of that object- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
addToBody
public PdfIndirectObject addToBody(PdfObject object, PdfIndirectReference ref, boolean inObjStm) throws IOException Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the object to addref- the indirect referenceinObjStm- a boolean- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
addToBody
Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the object to addrefNumber- the reference number- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
addToBody
public PdfIndirectObject addToBody(PdfObject object, int refNumber, boolean inObjStm) throws IOException Deprecated.Use this method to add a PDF object to the PDF body. Use this method only if you know what you're doing!- Parameters:
object- the object to addrefNumber- the reference numberinObjStm- a boolean- Returns:
- a PdfIndirectObject
- Throws:
IOException- thrown when an I/O operation fails
-
getPdfIndirectReference
Deprecated.Use this to get anPdfIndirectReferencefor an object that will be created in the future. Use this method only if you know what you're doing!- Returns:
- the
PdfIndirectReference
-
getCatalog
Deprecated. -
getExtraCatalog
Deprecated.Sets extra keys to the catalog.- Returns:
- the catalog to change
-
setLinearPageMode
public void setLinearPageMode()Deprecated.Use this method to make sure the page tree has a linear structure (every leave is attached directly to the root). Use this method to allow page reordering with method reorderPages. -
reorderPages
Deprecated.Use this method to reorder the pages in the document. Anullargument value only returns the number of pages to process. It is advisable to issue aDocument.newPage()before using this method.- Parameters:
order- an array with the new page sequence. It must have the same size as the number of pages.- Returns:
- the total number of pages
- Throws:
DocumentException- if all the pages are not present in the array
-
getPageReference
Deprecated.Use this method to get a reference to a page existing or not. If the page does not exist yet the reference will be created in advance. If on closing the document, a page number greater than the total number of pages was requested, an exception is thrown.- Parameters:
page- the page number. The first page is 1- Returns:
- the reference to the page
-
getPageNumber
public int getPageNumber()Deprecated.Gets the pagenumber of this document. This number can be different from the real pagenumber, if you have (re)set the page number previously.- Returns:
- a page number
-
getCurrentPage
Deprecated.Retrieves a reference to the current page of the document. The current page is typically the last page that was modified or accessed.- Returns:
- a
PdfIndirectReferenceobject pointing to the current page in the PDF document.
-
getCurrentPageNumber
public int getCurrentPageNumber()Deprecated.Returns the number of the current page in the document. The current page is typically the last page that was modified or accessed.- Returns:
- the current page number.
-
getTabs
Deprecated.Returns the value to be used for the Tabs entry in the page tree.- Returns:
- a PdfName of the value of the Tabs entry in the page dictionnary
- Since:
- 2.1.5
-
setTabs
Deprecated.Sets the value for the Tabs entry in the page tree.- Parameters:
tabs- Can be PdfName.R, PdfName.C or PdfName.S. Since the Adobe Extensions Level 3, it can also be PdfName.A or PdfName.W- Since:
- 2.1.5
-
getPageEvent
Deprecated.Gets thePdfPageEventfor this document ornullif none is set.- Returns:
- the
PdfPageEventfor this document ornullif none is set
-
setPageEvent
Deprecated.Sets thePdfPageEventfor this document.- Parameters:
event- thePdfPageEventfor this document
-
open
public void open()Deprecated.Signals that theDocumenthas been opened and thatElementscan be added.When this method is called, the PDF-document header is written to the outputstream.
- Specified by:
openin interfaceDocListener- Overrides:
openin classDocWriter- See Also:
-
close
public void close()Deprecated.Signals that theDocumentwas closed and that no otherElementswill 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.
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceDocListener- Overrides:
closein classDocWriter- See Also:
-
getRootOutline
Deprecated.Use this method to get the root outline and construct bookmarks.- Returns:
- the root outline
-
setOutlines
Deprecated.Sets the bookmarks. The list structure is defined inSimpleBookmark.- Parameters:
outlines- the bookmarks ornullto remove any
-
writeOutlines
Deprecated.- Throws:
IOException
-
setAtLeastPdfVersion
public void setAtLeastPdfVersion(char version) Deprecated.Description copied from interface:PdfVersionIf 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. If the PDF header was already written to the OutputStream, this changes the version as it will appear in the Catalog.- Specified by:
setAtLeastPdfVersionin interfacePdfVersion- Parameters:
version- a character representing the PDF version- See Also:
-
addDeveloperExtension
Deprecated.Description copied from interface:PdfVersionAdds a developer extension to the Extensions dictionary in the Catalog.- Specified by:
addDeveloperExtensionin interfacePdfVersion- Parameters:
de- an object that contains the extensions prefix and dictionary- Since:
- 2.1.6
- See Also:
-
setPdfVersion
public void setPdfVersion(char version) Deprecated.Description copied from interface:PdfVersionIf the PDF Header hasn't been written yet, this changes the version as it will appear in the PDF Header. If the PDF header was already written to the OutputStream, this changes the version as it will appear in the Catalog.- Specified by:
setPdfVersionin interfacePdfVersion- Parameters:
version- a character representing the PDF version- See Also:
-
setPdfVersion
Deprecated.Description copied from interface:PdfVersionSets the PDF version as it will appear in the Catalog. Note that this only has effect if you use a later version than the one that appears in the header; this method ignores the parameter if you try to set a lower version.- Specified by:
setPdfVersionin interfacePdfVersion- Parameters:
version- the PDF name that will be used for the Version key in the catalog- See Also:
-
setViewerPreferences
public void setViewerPreferences(int preferences) Deprecated.Description copied from interface:PdfViewerPreferencesSets the page layout and page mode preferences by ORing one or two of these constants.- The page layout to be used when the document is opened (choose one).
- PAGE_LAYOUT_SINGLE_PAGE - Display one page at a time. (default)
- PAGE_LAYOUT_ONE_COLUMN - Display the pages in one column.
- PAGE_LAYOUT_TWO_COLUMN_LEFT - Display the pages in two columns, with oddnumbered pages on the left.
- PAGE_LAYOUT_TWO_COLUMN_RIGHT - Display the pages in two columns, with oddnumbered pages on the right.
- PAGE_LAYOUT_TWO_PAGE_LEFT - Display the pages two at a time, with oddnumbered pages on the left.
- PAGE_LAYOUT_TWO_PAGE_RIGHT - Display the pages two at a time, with oddnumbered pages on the right.
- The page mode how the document should be displayed
when opened (choose one).
- PAGE_MODE_USE_NONE - Neither document outline nor thumbnail images visible. (default)
- PAGE_MODE_USE_OUTLINES - Document outline visible.
- PAGE_MODE_USE_THUMBS - Thumbnail images visible.
- PAGE_MODE_FULL_SCREEN - Full-screen mode, with no menu bar, window controls, or any other window visible.
- PAGE_MODE_USE_OC - Optional content group panel visible
- PAGE_MODE_USE_ATTACHMENTS - Attachments panel visible
addViewerPreference(key, value)if you want to change the following preferences:- HIDE_TOOLBAR - A flag specifying whether to hide the viewer application's tool bars when the document is active.
- HIDE_MENUBAR - A flag specifying whether to hide the viewer application's menu bar when the document is active.
- HIDE_WINDOW_UI - A flag specifying whether to hide user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed.
- FIT_WINDOW - A flag specifying whether to resize the document's window to fit the size of the first displayed page.
- CENTER_WINDOW - A flag specifying whether to position the document's window in the center of the screen.
- DISPLAY_DOC_TITLE - A flag specifying whether to display the document's title in the top bar.
- The predominant reading order for text. This entry has no direct effect on the
document's contents or page numbering, but can be used to determine the relative
positioning of pages when displayed side by side or printed n-up (choose one).
- DIRECTION_L2R - Left to right
- DIRECTION_R2L - Right to left (including vertical writing systems such as Chinese, Japanese, and Korean)
- The document's page mode, specifying how to display the
document on exiting full-screen mode. It is meaningful only
if the page mode is PageModeFullScreen (choose one).
- NON_FULL_SCREEN_PAGE_MODE_USE_NONE - Neither document outline nor thumbnail images visible
- NON_FULL_SCREEN_PAGE_MODE_USE_OUTLINES - Document outline visible
- NON_FULL_SCREEN_PAGE_MODE_USE_THUMBS - Thumbnail images visible
- NON_FULL_SCREEN_PAGE_MODE_USE_OC - Optional content group panel visible
- PRINT_SCALING_NONE - Indicates that the print dialog should reflect no page scaling.
- Specified by:
setViewerPreferencesin interfacePdfViewerPreferences- Parameters:
preferences- the viewer preferences- See Also:
- The page layout to be used when the document is opened (choose one).
-
addViewerPreference
Deprecated.Description copied from interface:PdfViewerPreferencesAdds a viewer preference.- In case the key is one of these values:
- PdfName.HIDETOOLBAR
- PdfName.HIDEMENUBAR
- PdfName.HIDEWINDOWUI
- PdfName.FITWINDOW
- PdfName.CENTERWINDOW
- PdfName.DISPLAYDOCTITLE
- In case the key is PdfName.NONFULLSCREENPAGEMODE,
the value must be one of these names:
- PdfName.USENONE
- PdfName.USEOUTLINES
- PdfName.USETHUMBS
- PdfName.USEOC
- In case the key is PdfName.DIRECTION,
the value must be one of these names:
- PdfName.L2R
- PdfName.R2L
- In case the key is one of these values:
- PdfName.VIEWAREA
- PdfName.VIEWCLIP
- PdfName.PRINTAREA
- PdfName.PRINTCLIP
- PdfName.MEDIABOX
- PdfName.CROPBOX
- PdfName.BLEEDBOX
- PdfName.TRIMBOX
- PdfName.ARTBOX
- In case the key is PdfName.PRINTSCALING, the value can be
- PdfName.APPDEFAULT
- PdfName.NONE
- In case the key is PdfName.DUPLEX, the value can be:
- PdfName.SIMPLEX
- PdfName.DUPLEXFLIPSHORTEDGE
- PdfName.DUPLEXFLIPLONGEDGE
- In case the key is PdfName.PICKTRAYBYPDFSIZE, the value must be of type PdfBoolean.
- In case the key is PdfName.PRINTPAGERANGE, the value must be of type PdfArray.
- In case the key is PdfName.NUMCOPIES, the value must be of type PdfNumber.
- Specified by:
addViewerPreferencein interfacePdfViewerPreferences- Parameters:
key- the name of the viewer preferencevalue- the value of the viewer preference- See Also:
- In case the key is one of these values:
-
setPageLabels
Deprecated.Use this method to add page labels- Parameters:
pageLabels- the page labels
-
addNamedDestinations
Deprecated.Adds named destinations in bulk. Valid keys and values of the map can be found in the map that is created by SimpleNamedDestination.- Parameters:
map- a map with strings as keys for the names, and structured strings as values for the destinationspage_offset- number of pages that has to be added to the page numbers in the destinations (useful if you use this method in combination with PdfCopy).- Since:
- iText 5.0
-
addNamedDestination
Deprecated.Adds one named destination.- Parameters:
name- the name for the destinationpage- the page number where you want to jump todest- an explicit destination- Since:
- iText 5.0
-
addJavaScript
Deprecated.Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
js- The JavaScript action
-
addJavaScript
Deprecated.Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
code- the JavaScript codeunicode- select JavaScript unicode. Note that the internal Acrobat JavaScript engine does not support unicode, so this may or may not work for you
-
addJavaScript
Deprecated.Use this method to adds a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
code- the JavaScript code
-
addJavaScript
Deprecated.Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
name- The name of the JS Action in the name treejs- The JavaScript action
-
addJavaScript
Deprecated.Use this method to add a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
name- The name of the JS Action in the name treecode- the JavaScript codeunicode- select JavaScript unicode. Note that the internal Acrobat JavaScript engine does not support unicode, so this may or may not work for you
-
addJavaScript
Deprecated.Use this method to adds a JavaScript action at the document level. When the document opens, all this JavaScript runs.- Parameters:
name- The name of the JS Action in the name treecode- the JavaScript code
-
addFileAttachment
public void addFileAttachment(String description, byte[] fileStore, String file, String fileDisplay) throws IOException Deprecated.Use this method to add a file attachment at the document level.- Parameters:
description- the file descriptionfileStore- an array with the file. If it'snullthe file will be read from the diskfile- the path to the file. It will only be used iffileStoreis notnullfileDisplay- the actual file name stored in the pdf- Throws:
IOException- on error
-
addFileAttachment
Deprecated.Use this method to add a file attachment at the document level.- Parameters:
description- the file descriptionfs- the file specification- Throws:
IOException- thrown when an I/O operation fails
-
addFileAttachment
Deprecated.Use this method to add a file attachment at the document level.- Parameters:
fs- the file specification- Throws:
IOException- thrown when an I/O operation fails
-
setOpenAction
Deprecated.Description copied from interface:PdfDocumentActionsWhen the document opens it will jump to the destination with this name.- Specified by:
setOpenActionin interfacePdfDocumentActions- Parameters:
name- the name of the destination to jump to- See Also:
-
setOpenAction
Deprecated.Description copied from interface:PdfDocumentActionsWhen the document opens thisactionwill be invoked.- Specified by:
setOpenActionin interfacePdfDocumentActions- Parameters:
action- the action to be invoked- See Also:
-
setAdditionalAction
Deprecated.Description copied from interface:PdfDocumentActionsAdditional-actions defining the actions to be taken in response to various trigger events affecting the document as a whole. The actions types allowed are:DOCUMENT_CLOSE,WILL_SAVE,DID_SAVE,WILL_PRINTandDID_PRINT.- Specified by:
setAdditionalActionin interfacePdfDocumentActions- Parameters:
actionType- the action typeaction- the action to execute in response to the trigger- Throws:
DocumentException- on invalid action type- See Also:
-
setCollection
Deprecated.Use this method to add the Collection dictionary.- Parameters:
collection- a dictionary of type PdfCollection
-
getAcroForm
Deprecated.Description copied from interface:PdfAnnotationsUse this methods to get the AcroForm object. Use this method only if you know what you're doing- Specified by:
getAcroFormin interfacePdfAnnotations- Returns:
- the PdfAcroform object of the PdfDocument
- See Also:
-
addAnnotation
Deprecated.Description copied from interface:PdfAnnotationsUse this methods to add aPdfAnnotationor aPdfFormFieldto the document. Only the top parent of aPdfFormFieldneeds to be added.- Specified by:
addAnnotationin interfacePdfAnnotations- Parameters:
annot- thePdfAnnotationor thePdfFormFieldto add- See Also:
-
addCalculationOrder
Deprecated.Description copied from interface:PdfAnnotationsUse this method to adds thePdfAnnotationto the calculation order array.- Specified by:
addCalculationOrderin interfacePdfAnnotations- Parameters:
annot- thePdfAnnotationto be added- See Also:
-
setSigFlags
public void setSigFlags(int f) Deprecated.Description copied from interface:PdfAnnotationsUse this method to set the signature flags.- Specified by:
setSigFlagsin interfacePdfAnnotations- Parameters:
f- the flags. This flags are ORed with current ones- See Also:
-
setXmpMetadata
public void setXmpMetadata(byte[] xmpMetadata) Deprecated.Use this method to set the XMP Metadata.- Parameters:
xmpMetadata- The xmpMetadata to set.
-
setPageXmpMetadata
public void setPageXmpMetadata(byte[] xmpMetadata) Deprecated.Use this method to set the XMP Metadata for each page.- Parameters:
xmpMetadata- The xmpMetadata to set.
-
createXmpMetadata
public void createXmpMetadata()Deprecated.Use this method to creates XMP Metadata based on the metadata in the PdfDocument. -
getPDFXConformance
public int getPDFXConformance()Deprecated.Description copied from interface:PdfXConformanceGetter for the PDF/X Conformance value.- Specified by:
getPDFXConformancein interfacePdfXConformance- Returns:
- the pdfxConformance
- See Also:
-
setPDFXConformance
public void setPDFXConformance(int pdfx) Deprecated.Description copied from interface:PdfXConformanceSets the PDF/X conformance level. Allowed values are PDFX1A2001, PDFX32002, PDFA1A and PDFA1B. It must be called before opening the document.- Specified by:
setPDFXConformancein interfacePdfXConformance- Parameters:
pdfx- the conformance level- See Also:
-
isPdfX
public boolean isPdfX()Deprecated.Description copied from interface:PdfXConformanceChecks if the PDF/X Conformance is necessary.- Specified by:
isPdfXin interfacePdfXConformance- Returns:
- true if the PDF has to be in conformance with any of the PDF/X specifications
- See Also:
-
isPdfA1
public boolean isPdfA1()Deprecated. -
setOutputIntents
public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, ICC_Profile colorProfile) throws IOException Deprecated.Sets the values of the output intent dictionary. Null values are allowed to suppress any key.- Parameters:
outputConditionIdentifier- a valueoutputCondition- a value, "PDFA/A" to force GTS_PDFA1, otherwise cued by pdfxConformance.registryName- a valueinfo- a valuecolorProfile- a value- Throws:
IOException- on error- Since:
- 2.1.5
-
setOutputIntents
public void setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] destOutputProfile) throws IOException Deprecated.Sets the values of the output intent dictionary. Null values are allowed to suppress any key.Prefer the
ICC_Profile-based version of this method.- Parameters:
outputConditionIdentifier- a valueoutputCondition- a value, "PDFA/A" to force GTS_PDFA1, otherwise cued by pdfxConformance.registryName- a valueinfo- a valuedestOutputProfile- a value- Throws:
IOException- on error- Since:
- 1.x
-
setOutputIntents
Deprecated.Use this method to copy the output intent dictionary from another document to this one.- Parameters:
reader- the other documentcheckExistence-trueto just check for the existence of a valid output intent dictionary,falseto insert the dictionary if it exists- Returns:
trueif the output intent dictionary exists,falseotherwise- Throws:
IOException- on error
-
setEncryption
public void setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) throws DocumentException Deprecated.Description copied from interface:PdfEncryptionSettingsSets the encryption options for this document. The userPassword and the ownerPassword can be null or have zero length. In this case the ownerPassword is replaced by a random string. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them.- Specified by:
setEncryptionin interfacePdfEncryptionSettings- Parameters:
userPassword- 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 cleartext- Throws:
DocumentException- if the document is already open- See Also:
-
setEncryption
public void setEncryption(Certificate[] certs, int[] permissions, int encryptionType) throws DocumentException Deprecated.Description copied from interface:PdfEncryptionSettingsSets the certificate encryption options for this document. An array of one or more public certificates must be provided together with an array of the same size for the permissions for each certificate. The open permissions for the document can be AllowPrinting, AllowModifyContents, AllowCopy, AllowModifyAnnotations, AllowFillIn, AllowScreenReaders, AllowAssembly and AllowDegradedPrinting. The permissions can be combined by ORing them. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext- Specified by:
setEncryptionin interfacePdfEncryptionSettings- Parameters:
certs- 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.- Throws:
DocumentException- if the document is already open- See Also:
-
isFullCompression
public boolean isFullCompression()Deprecated.Use this method to find out if 1.5 compression is on.- Returns:
- the 1.5 compression status
-
setFullCompression
public void setFullCompression()Deprecated.Use this method to set the document's compression to the PDF 1.5 mode with object streams and xref streams. It can be set at any time but once set it can't be unset.If set before opening the document it will also set the pdf version to 1.5.
-
getCompressionLevel
public int getCompressionLevel()Deprecated.Returns the compression level used for streams written by this writer.- Returns:
- the compression level (0 = best speed, 9 = best compression, -1 is default)
- Since:
- 2.1.3
-
setCompressionLevel
public void setCompressionLevel(int compressionLevel) Deprecated.Sets the compression level to be used for streams written by this writer.- Parameters:
compressionLevel- a value between 0 (best speed) and 9 (best compression)- Since:
- 2.1.3
-
releaseTemplate
Deprecated.Use this method to releases the memory used by a template. This method writes the template to the output. The template can still be added to any content but changes to the template itself won't have any effect.- Parameters:
tp- the template to release- Throws:
IOException- on error
-
getImportedPage
Deprecated.Use this method to get a page from other PDF document. The page can be used as any other PdfTemplate. Note that calling this method more than once with the same parameters will retrieve the same object.- Parameters:
reader- the PDF document where the page ispageNumber- the page number. The first page is 1- Returns:
- the template representing the imported page
-
freeReader
Deprecated.Use this method to writes the reader to the document and free the memory used by it. The main use is when concatenating multiple documents to keep the memory usage restricted to the current appending document.- Parameters:
reader- thePdfReaderto free- Throws:
IOException- on error
-
getCurrentDocumentSize
public long getCurrentDocumentSize()Deprecated.Use this method to gets the current document size. This size only includes the data already written to the output stream, it does not include templates or fonts. It is useful if used withfreeReader()when concatenating many documents and an idea of the current size is needed.- Returns:
- the approximate size without fonts or templates
-
getNewObjectNumber
Deprecated. -
setTagged
public void setTagged()Deprecated.Mark this document for tagging. It must be called before open. -
isTagged
public boolean isTagged()Deprecated.Check if the document is marked for tagging.- Returns:
trueif the document is marked for tagging
-
getStructureTreeRoot
Deprecated.Gets the structure tree root. If the document is not marked for tagging it will returnnull.- Returns:
- the structure tree root
-
getOCProperties
Deprecated.Use this method to get the Optional Content Properties Dictionary. Each call fills the dictionary with the current layer state. It's advisable to only call this method right before close and do any modifications at that time.- Returns:
- the Optional Content Properties Dictionary
-
addOCGRadioGroup
Deprecated.Use this method to set a collection of optional content groups whose states are intended to follow a "radio button" paradigm. That is, the state of at most one optional content group in the array should be ON at a time: if one group is turned ON, all others must be turned OFF.- Parameters:
group- the radio group
-
lockLayer
Deprecated.Use this method to lock an optional content group. The state of a locked group cannot be changed through the user interface of a viewer application. Producers can use this entry to prevent the visibility of content that depends on these groups from being changed by users.- Parameters:
layer- the layer that needs to be added to the array of locked OCGs- Since:
- 2.1.2
-
fillOCProperties
protected void fillOCProperties(boolean erase) Deprecated.- Parameters:
erase- true to erase, false otherwise- Since:
- 2.1.2
-
getPageSize
Deprecated.Use this method to get the size of the media box.- Returns:
- a Rectangle
-
setCropBoxSize
Deprecated.Use this method to set the crop box. The crop box should not be rotated even if the page is rotated. This change only takes effect in the next page.- Parameters:
crop- the crop box
-
setBoxSize
Deprecated.Use this method to set the page box sizes. Allowed names are: "crop", "trim", "art" and "bleed".- Parameters:
boxName- the box sizesize- the size
-
getBoxSize
Deprecated.Use this method to get the size of a trim, art, crop or bleed box, or null if not defined.- Parameters:
boxName- crop, trim, art or bleed- Returns:
- the Rectangle
-
isPageEmpty
public boolean isPageEmpty()Deprecated.Checks if a newPage() will actually generate a new page.- Returns:
- true if a new page will be generated, false otherwise
- Since:
- 2.1.8
-
setPageEmpty
public void setPageEmpty(boolean pageEmpty) Deprecated.Use this method to make sure a page is added, even if it's empty. If you use setPageEmpty(false), invoking newPage() after a blank page will add a newPage. setPageEmpty(true) won't have any effect.- Parameters:
pageEmpty- the state
-
setPageAction
Deprecated.Description copied from interface:PdfPageActionsSets the open and close page additional action.- Specified by:
setPageActionin interfacePdfPageActions- Parameters:
actionType- the action type. It can bePdfWriter.PAGE_OPENorPdfWriter.PAGE_CLOSEaction- the action to perform- Throws:
DocumentException- if the action type is invalid- See Also:
-
setDuration
public void setDuration(int seconds) Deprecated.Description copied from interface:PdfPageActionsSets the display duration for the page (for presentations)- Specified by:
setDurationin interfacePdfPageActions- Parameters:
seconds- the number of seconds to display the page- See Also:
-
setTransition
Deprecated.Description copied from interface:PdfPageActionsSets the transition for the page- Specified by:
setTransitionin interfacePdfPageActions- Parameters:
transition- the Transition object- See Also:
-
setThumbnail
Deprecated.Use this method to set the thumbnail image for the current page.- Parameters:
image- the image- Throws:
PdfException- on errorDocumentException- or error
-
getGroup
Deprecated.Use this method to get the group dictionary.- Returns:
- Value of property group.
-
setGroup
Deprecated.Use this method to set the group dictionary.- Parameters:
group- New value of property group.
-
getSpaceCharRatio
public float getSpaceCharRatio()Deprecated.Use this method to gets the space/character extra spacing ratio for fully justified text.- Returns:
- the space/character extra spacing ratio
-
setSpaceCharRatio
public void setSpaceCharRatio(float spaceCharRatio) Deprecated.Use this method to set the ratio between the extra word spacing and the extra character spacing when the text is fully justified. Extra word spacing will growspaceCharRatiotimes more than extra character spacing. If the ratio isPdfWriter.NO_SPACE_CHAR_RATIOthen the extra character spacing will be zero.- Parameters:
spaceCharRatio- the ratio between the extra word spacing and the extra character spacing
-
getRunDirection
public int getRunDirection()Deprecated.Use this method to set the run direction.- Specified by:
getRunDirectionin interfacePdfRunDirection- Returns:
- the run direction
-
setRunDirection
public void setRunDirection(int runDirection) Deprecated.Use this method to set the run direction. This is only used as a placeholder as it does not affect anything.- Specified by:
setRunDirectionin interfacePdfRunDirection- Parameters:
runDirection- the run direction
-
getUserunit
public float getUserunit()Deprecated.Use this method to get the user unit. A user unit is a value that defines the default user space unit. The minimum UserUnit is 1 (1 unit = 1/72 inch). The maximum UserUnit is 75,000. Note that this userunit only works starting with PDF1.6!- Returns:
- Returns the userunit.
-
setUserunit
Deprecated.Use this method to set the user unit. A UserUnit is a value that defines the default user space unit. The minimum UserUnit is 1 (1 unit = 1/72 inch). The maximum UserUnit is 75,000. Note that this userunit only works starting with PDF1.6!- Parameters:
userunit- The userunit to set.- Throws:
DocumentException- on error
-
getDefaultColorspace
Deprecated.Use this method to get the default colorspaces.- Returns:
- the default colorspaces
-
setDefaultColorspace
Deprecated.Use this method to sets the default colorspace that will be applied to all the document. The colorspace is only applied if another colorspace with the same name is not present in the content.The colorspace is applied immediately when creating templates and at the page end for the main document content.
- Parameters:
key- the name of the colorspace. It can bePdfName.DEFAULTGRAY,PdfName.DEFAULTRGBorPdfName.DEFAULTCMYKcs- the colorspace. AnullorPdfNullremoves any colorspace with the same name
-
isStrictImageSequence
public boolean isStrictImageSequence()Deprecated.Use this method to get the strictImageSequence status.- Returns:
- value of property strictImageSequence
-
setStrictImageSequence
public void setStrictImageSequence(boolean strictImageSequence) Deprecated.Use this method to set the image sequence, so that it follows the text in strict order (or not).- Parameters:
strictImageSequence- new value of property strictImageSequence
-
clearTextWrap
Deprecated.Use this method to clear text wrapping around images (if applicable).- Throws:
DocumentException- on error
-
addDirectImageSimple
Deprecated.Use this method to adds an image to the document but not to the page resources. It is used with templates andDocument.add(Image). Use this method only if you know what you're doing!- Parameters:
image- theImageto add- Returns:
- the name of the image added
- Throws:
PdfException- on errorDocumentException- on error
-
addDirectImageSimple
public PdfName addDirectImageSimple(Image image, PdfIndirectReference fixedRef) throws DocumentException Deprecated.Adds an image to the document but not to the page resources. It is used with templates andDocument.add(Image). Use this method only if you know what you're doing!- Parameters:
image- theImageto addfixedRef- the reference to used. It may benull, aPdfIndirectReferenceor aPRIndirectReference.- Returns:
- the name of the image added
- Throws:
PdfException- on errorDocumentException- on error
-
add
Deprecated. -
getReferenceJBIG2Globals
Deprecated.Gets an indirect reference to a JBIG2 Globals stream. Adds the stream if it hasn't already been added to the writer.- Parameters:
content- a byte array that may already been added to the writer inside a stream object.- Returns:
- the PdfIndirectReference
- Since:
- 2.1.5
-
fitsPage
Deprecated.Checks if aTablefits the current page of thePdfDocument.- Parameters:
table- the table that has to be checkedmargin- a certain margin- Returns:
trueif theTablefits the page,falseotherwise.
-
fitsPage
Deprecated.Checks if aTablefits the current page of thePdfDocument.- Parameters:
table- the table that has to be checked- Returns:
trueif theTablefits the page,falseotherwise.
-
isUserProperties
public boolean isUserProperties()Deprecated.Gets the flag indicating the presence of structure elements that contain user properties attributes.- Returns:
- the user properties flag
-
setUserProperties
public void setUserProperties(boolean userProperties) Deprecated.Sets the flag indicating the presence of structure elements that contain user properties attributes.- Parameters:
userProperties- the user properties flag
-
isRgbTransparencyBlending
public boolean isRgbTransparencyBlending()Deprecated.Gets the transparency blending colorspace.- Returns:
trueif the transparency blending colorspace is RGB,falseif it is the default blending colorspace- Since:
- 2.1.0
-
setRgbTransparencyBlending
public void setRgbTransparencyBlending(boolean rgbTransparencyBlending) Deprecated.Sets the transparency blending colorspace to RGB. The default blending colorspace is CMYK and will result in faded colors in the screen and in printing. Calling this method will return the RGB colors to what is expected. The RGB blending will be applied to all subsequent pages until other value is set. Note that this is a generic solution that may not work in all cases.- Parameters:
rgbTransparencyBlending-trueto set the transparency blending colorspace to RGB,falseto use the default blending colorspace- Since:
- 2.1.0
-