com.lowagie.text.pdf
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.
Nested Class Summary | |
---|---|
static class | PdfWriter.PdfBody
This class generates the structure of a PDF document.
|
static class | PdfWriter.PdfTrailerPdfTrailer is the PDF Trailer object.
|
Field Summary | |
---|---|
static int | AllowAssembly The operation permitted when the document is opened with the user password |
static int | AllowCopy The operation permitted when the document is opened with the user password |
static int | AllowDegradedPrinting The operation permitted when the document is opened with the user password |
static int | AllowFillIn The operation permitted when the document is opened with the user password |
static int | AllowModifyAnnotations The operation permitted when the document is opened with the user password |
static int | AllowModifyContents The operation permitted when the document is opened with the user password |
static int | AllowPrinting The operation permitted when the document is opened with the user password |
static int | AllowScreenReaders The operation permitted when the document is opened with the user password |
protected PdfWriter.PdfBody | body body of the PDF document |
protected int | colorNumber The color number counter for the colors in the document. |
protected PdfEncryption | crypto Contains the business logic for cryptography. |
protected int | currentPageNumber The current page number. |
protected PdfReaderInstance | currentPdfReaderInstance |
static int | CenterWindow A viewer preference |
protected PdfDictionary | defaultColorspace |
protected PdfContentByte | directContent The direct content in this document. |
protected PdfContentByte | directContentUnder The direct content under in this document. |
protected HashMap | documentColors The colors of this document |
protected HashMap | documentExtGState |
protected HashMap | documentFonts The fonts of this document |
protected HashSet | documentOCG |
protected ArrayList | documentOCGorder |
protected HashMap | documentPatterns The patterns of this document |
protected HashMap | documentProperties |
protected HashMap | documentShadingPatterns |
protected HashMap | documentShadings |
protected HashMap | documentSpotPatterns |
static int | DirectionL2R A viewer preference |
static int | DirectionR2L A viewer preference |
static int | DisplayDocTitle A viewer preference |
static PdfName | DID_PRINT action value |
static PdfName | DID_SAVE action value |
static PdfName | DOCUMENT_CLOSE action value |
static int | DO_NOT_ENCRYPT_METADATA Add this to the mode to keep the metadata in clear text |
protected PdfDictionary | extraCatalog Holds value of property extraCatalog this is used for Output Intents. |
static int | ENCRYPTION_AES_128 Type of encryption |
static int | ENCRYPTION_MASK Mask to separate the encryption type from the encryption mode. |
static int | ENCRYPTION_RC4_128 Type of encryption |
static int | ENCRYPTION_RC4_40 Type of encryption |
protected int | fontNumber The font number counter for the fonts in the document. |
protected HashMap | formXObjects The form XObjects in this document. |
protected int | formXObjectsCounter The name counter for the form XObjects name. |
protected boolean | fullCompression Holds value of property fullCompression. |
static int | FitWindow A viewer preference |
protected PdfDictionary | group
A group attributes dictionary specifying the attributes
of the pages page group for use in the transparent
imaging model |
static int | HideMenubar A viewer preference |
static int | HideToolbar A viewer preference |
static int | HideWindowUI A viewer preference |
protected PdfDictionary | imageDictionary Dictionary, containing all the images of the PDF document |
HashMap | images This is the list with all the images in the document. |
protected HashMap | importedPages |
static int | NonFullScreenPageModeUseNone A viewer preference |
static int | NonFullScreenPageModeUseOC A viewer preference |
static int | NonFullScreenPageModeUseOutlines A viewer preference |
static int | NonFullScreenPageModeUseThumbs A viewer preference |
static float | NO_SPACE_CHAR_RATIO Disable the inter-character spacing. |
protected PdfArray | OCGRadioGroup |
protected PdfOCProperties | OCProperties |
PdfPageEvent | pageEvent The PdfPageEvent for this document. |
protected ArrayList | pageReferences The PdfIndirectReference to the pages. |
protected ColorDetails | patternColorspaceCMYK |
protected ColorDetails | patternColorspaceGRAY |
protected ColorDetails | patternColorspaceRGB |
protected int | patternNumber The patten number counter for the colors in the document. |
protected PdfDocument | pdf the pdfdocument object. |
PdfXConformanceImp | pdfxConformance Stores the PDF/X level. |
protected PdfVersionImp | pdf_version Stores the version information for the header and the catalog. |
protected int | prevxref A number refering to the previous Cross-Reference Table. |
static PdfName | PAGE_CLOSE action value |
static PdfName | PAGE_OPEN action value |
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 |
static int | PDFX1A2001 A PDF/X level. |
static int | PDFX32002 A PDF/X level. |
static int | PDFXNONE A PDF/X level. |
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 | PrintScalingNone A viewer preference |
protected PdfPages | root The root of the page tree. |
protected int | runDirection |
static int | RUN_DIRECTION_DEFAULT Use the default run direction. |
static int | RUN_DIRECTION_LTR Use bidirectional reordering with left-to-right
preferential run direction. |
static int | RUN_DIRECTION_NO_BIDI Do not use bidirectional reordering. |
static int | RUN_DIRECTION_RTL Use bidirectional reordering with right-to-left
preferential run direction. |
float | spaceCharRatio
The ratio between the extra word spacing and the extra character spacing.
|
protected PdfStructureTreeRoot | structureTreeRoot |
static int | SIGNATURE_APPEND_ONLY signature value |
static int | SIGNATURE_EXISTS signature value |
static float | SPACE_CHAR_RATIO_DEFAULT The default space-char ratio. |
static boolean | STRENGTH128BITS Type of RC4 encryption strength |
static boolean | STRENGTH40BITS Type of RC4 encryption strength |
protected boolean | tagged |
protected float | userunit |
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) |
static PdfName | WILL_PRINT action value |
static PdfName | WILL_SAVE action value |
protected byte[] | xmpMetadata XMP Metadata for the document. |
Constructor Summary | |
---|---|
protected | PdfWriter()
Constructs a PdfWriter . |
protected | PdfWriter(PdfDocument document, OutputStream os)
Constructs a PdfWriter .
|
Method Summary | |
---|---|
PdfIndirectReference | add(PdfPage page, PdfContents contents)
Adds some PdfContents to this Writer.
|
PdfIndirectReference | add(PdfImage pdfImage, PdfIndirectReference fixedRef)
Writes a PdfImage to the outputstream.
|
protected PdfIndirectReference | add(PdfICCBased icc) |
void | addAnnotation(PdfAnnotation annot) |
void | addAnnotation(PdfAnnotation annot, int page) |
void | addASEvent(PdfName event, PdfName category) |
void | addCalculationOrder(PdfFormField annot) |
PdfName | addDirectImageSimple(Image image)
Use this method to adds an image to the document
but not to the page resources. |
PdfName | addDirectImageSimple(Image image, PdfIndirectReference fixedRef)
Adds an image to the document but not to the page resources.
|
PdfName | addDirectTemplateSimple(PdfTemplate template, PdfName forcedName)
Adds a template to the document but not to the page resources. |
void | addFileAttachment(String description, byte[] fileStore, String file, String fileDisplay)
Use this method to add a file attachment at the document level. |
void | addFileAttachment(String description, PdfFileSpecification fs)
Use this method to add a file attachment at the document level. |
void | addFileAttachment(PdfFileSpecification fs)
Use this method to add a file attachment at the document level. |
void | addJavaScript(PdfAction js)
Use this method to add a JavaScript action at the document level.
|
void | addJavaScript(String code, boolean unicode)
Use this method to add a JavaScript action at the document level.
|
void | addJavaScript(String code)
Use this method to adds a JavaScript action at the document level.
|
void | addLocalDestinations(TreeMap dest)
Adds the local destinations to the body of the document. |
void | addOCGRadioGroup(ArrayList group)
Use this method to set a collection of optional content groups
whose states are intended to follow a "radio button" paradigm.
|
protected void | addSharedObjectsToBody() |
FontDetails | addSimple(BaseFont bf)
Adds a BaseFont to the document but not to the page resources.
|
ColorDetails | addSimple(PdfSpotColor spc)
Adds a SpotColor to the document but not to the page resources. |
PdfObject[] | addSimpleExtGState(PdfDictionary gstate) |
PdfName | addSimplePattern(PdfPatternPainter painter) |
ColorDetails | addSimplePatternColorspace(Color color) |
PdfObject[] | addSimpleProperty(Object prop, PdfIndirectReference refi) |
void | addSimpleShading(PdfShading shading) |
void | addSimpleShadingPattern(PdfShadingPattern shading) |
PdfIndirectObject | addToBody(PdfObject object)
Use this method to add a PDF object to the PDF body.
|
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.
|
PdfIndirectObject | addToBody(PdfObject object, PdfIndirectReference ref, boolean inObjStm)
Use this method to add a PDF object to the PDF body.
|
PdfIndirectObject | addToBody(PdfObject object, int refNumber)
Use this method to add a PDF object to the PDF body.
|
PdfIndirectObject | addToBody(PdfObject object, int refNumber, boolean inObjStm)
Use this method to add a PDF object to the PDF body.
|
void | addViewerPreference(PdfName key, PdfObject value) |
boolean | breakTableIfDoesntFit(PdfTable table) |
void | clearTextWrap()
Use this method to clear text wrapping around images (if applicable). |
void | close()
Signals that the Document was closed and that no other
Elements will be added.
|
void | createXmpMetadata()
Use this method to creates XMP Metadata based
on the metadata in the PdfDocument. |
byte[] | createXmpMetadataBytes() |
void | eliminateFontSubset(PdfDictionary fonts) |
void | fillOCProperties(boolean erase) |
boolean | fitsPage(Table table, float margin)
Checks if a Table fits the current page of the PdfDocument .
|
boolean | fitsPage(Table table)
Checks if a Table fits the current page of the PdfDocument .
|
boolean | fitsPage(PdfPTable table, float margin)
Checks if a PdfPTable fits the current page of the PdfDocument .
|
boolean | fitsPage(PdfPTable table)
Checks if a PdfPTable fits the current page of the PdfDocument .
|
void | freeReader(PdfReader reader)
Use this method to writes the reader to the document
and free the memory used by it.
|
PdfAcroForm | getAcroForm() |
Rectangle | getBoxSize(String boxName)
Use this method to get the size of a trim, art, crop or bleed box,
or null if not defined. |
protected PdfDictionary | getCatalog(PdfIndirectReference rootObj) |
PdfName | getColorspaceName() |
int | getCurrentDocumentSize()
Use this method to gets the current document size.
|
PdfIndirectReference | getCurrentPage() |
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.
|
PdfEncryption | getEncryption() |
PdfDictionary | getExtraCatalog()
Sets extra keys to the catalog. |
PdfDictionary | getGroup()
Use this method to get the group dictionary. |
PdfIndirectReference | getImageReference(PdfName name)
return the PdfIndirectReference to the image with a given name.
|
PdfImportedPage | getImportedPage(PdfReader reader, int pageNumber)
Use this method to get a page from other PDF document.
|
int | getIndirectReferenceNumber() |
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 .
|
static PdfWriter | getInstance(Document document, OutputStream os, DocListener listener)
Use this method to get an instance of the PdfWriter .
|
static String | getNameString(PdfDictionary dic, PdfName key) |
protected int | getNewObjectNumber(PdfReader reader, int number, int generation) |
static void | getOCGOrder(PdfArray order, PdfLayer layer) |
PdfOCProperties | getOCProperties()
Use this method to get the Optional Content Properties Dictionary.
|
OutputStreamCounter | getOs()
Returns the outputStreamCounter. |
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. |
PdfDocument | getPdfDocument()
Gets the PdfDocument associated with this writer. |
PdfIndirectReference | getPdfIndirectReference()
Use this to get an PdfIndirectReference for an object that
will be created in the future.
|
PdfTable | getPdfTable(Table table)
Gets a pre-rendered table.
|
PdfVersionImp | getPdfVersion()
Returns the version information. |
int | getPDFXConformance() |
RandomAccessFileOrArray | getReaderFile(PdfReader reader) |
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. |
PdfStructureTreeRoot | getStructureTreeRoot()
Gets the structure tree root. |
float | getTableBottom(Table table)
Sometimes it is necessary to know where the just added Table ends.
|
float | getUserunit()
Use this method to get the user unit.
|
float | getVerticalPosition(boolean ensureNewLine)
Use this method to get the current vertical page position. |
boolean | isFullCompression()
Use this method to find out if 1.5 compression is on. |
boolean | isPdfX() |
boolean | isStrictImageSequence()
Use this method to get the strictImageSequence status. |
boolean | isTagged()
Check if the document is marked for tagging. |
void | open()
Signals that the Document has been opened and that
Elements can be added.
|
boolean | propertyExists(Object prop) |
void | registerLayer(PdfOCG layer) |
void | releaseTemplate(PdfTemplate tp)
Use this method to releases the memory used by a template.
|
int | reorderPages(int[] order)
Use this method to reorder the pages in the document.
|
void | resetContent()
Resets all the direct contents to empty.
|
void | setAdditionalAction(PdfName actionType, PdfAction action) |
void | setAtLeastPdfVersion(char version) |
void | setBoxSize(String boxName, Rectangle size)
Use this method to set the page box sizes.
|
void | setCollection(PdfCollection collection)
Use this method to add the Collection dictionary. |
void | setCropBoxSize(Rectangle crop)
Use this method to set the crop box.
|
void | setDefaultColorspace(PdfName key, PdfObject cs)
Use this method to sets the default colorspace that will be applied
to all the document. |
void | setDuration(int seconds) |
void | setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, int encryptionType) |
void | setEncryption(Certificate[] certs, int[] permissions, int encryptionType) |
void | setEncryption(byte[] userPassword, byte[] ownerPassword, int permissions, boolean strength128Bits)
Sets the encryption options for this document. |
void | setEncryption(boolean strength, String userPassword, String ownerPassword, int permissions)
Sets the encryption options for this document. |
void | setEncryption(int encryptionType, String userPassword, String ownerPassword, int permissions)
Sets the encryption options for this document. |
void | setFullCompression()
Use this method to set the document's compression to the
PDF 1.5 mode with object streams and xref streams.
|
void | setGroup(PdfDictionary group)
Use this method to set the group dictionary. |
void | setLinearPageMode()
Use this method to make sure the page tree has a lineair structure
(every leave is attached directly to the root).
|
void | setOpenAction(String name) |
void | setOpenAction(PdfAction action) |
void | setOutputIntents(String outputConditionIdentifier, String outputCondition, String registryName, String info, byte[] destOutputProfile)
Use this method to set the values of the output intent dictionary.
|
boolean | setOutputIntents(PdfReader reader, boolean checkExistence)
Use this method to copy the output intent dictionary
from another document to this one. |
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(PdfPageLabels pageLabels)
Use this method to add page labels |
void | setPdfVersion(char version) |
void | setPdfVersion(PdfName version) |
void | setPDFXConformance(int pdfx) |
void | setRunDirection(int runDirection)
Use this method to set the run direction.
|
void | setSigFlags(int f) |
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 | 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) |
void | setUserunit(float userunit)
Use this method to set the user unit.
|
void | setViewerPreferences(int preferences) |
void | setXmpMetadata(byte[] xmpMetadata)
Use this method to set the XMP Metadata. |
PdfPageEvent
for this document.ratio
times more than extra character spacing.PdfWriter
.PdfWriter
.
Remark: a PdfWriter can only be constructed by calling the method
getInstance(Document document, OutputStream os)
.
Parameters: document The PdfDocument
that has to be written os The OutputStream
the writer has to write to.
PdfContents
to this Writer.
The document has to be open before you can begin to add content to the body of the document.
Parameters: page the PdfPage
to add contents the PdfContents
of the page
Returns: a PdfIndirectReference
Throws: PdfException on error
PdfImage
to the outputstream.
Parameters: pdfImage the image to be added
Returns: a PdfIndirectReference
to the encapsulated image
Throws: PdfException when a document isn't open yet, or has been closed
See Also: addAnnotation
See Also: addCalculationOrder
Document.add(Image)
.
Use this method only if you know what you're doing!Parameters: image the Image
to add
Returns: the name of the image added
Throws: PdfException on error DocumentException on error
Document.add(Image)
.
Use this method only if you know what you're doing!Parameters: image the Image
to add fixedRef the reference to used. It may be null
,
a PdfIndirectReference
or a PRIndirectReference
.
Returns: the name of the image added
Throws: PdfException on error DocumentException on error
Parameters: template the template to add forcedName the template name, rather than a generated one. Can be null
Returns: the PdfName
for this template
Parameters: description the file description fileStore an array with the file. If it's null
the file will be read from the disk file the path to the file. It will only be used if
fileStore
is not null
fileDisplay the actual file name stored in the pdf
Throws: IOException on error
Parameters: description the file description fs the file specification
Parameters: fs the file specification
Parameters: js The JavaScrip action
Parameters: code the JavaScript code unicode select JavaScript unicode. Note that the internal Acrobat JavaScript engine does not support unicode, so this may or may not work for you
Parameters: code the JavaScript code
Parameters: dest the HashMap
containing the destinations
Throws: IOException on error
Parameters: group the radio group
BaseFont
to the document but not to the page resources.
It is used for templates.Parameters: bf the BaseFont
to add
Returns: an Object[]
where position 0 is a PdfName
and position 1 is an PdfIndirectReference
SpotColor
to the document but not to the page resources.Parameters: spc the SpotColor
to add
Returns: an Object[]
where position 0 is a PdfName
and position 1 is an PdfIndirectReference
Parameters: object
Returns: a PdfIndirectObject
Throws: IOException
Parameters: object inObjStm
Returns: a PdfIndirectObject
Throws: IOException
Parameters: object ref
Returns: a PdfIndirectObject
Throws: IOException
Parameters: object ref inObjStm
Returns: a PdfIndirectObject
Throws: IOException
Parameters: object refNumber
Returns: a PdfIndirectObject
Throws: IOException
Parameters: object refNumber inObjStm
Returns: a PdfIndirectObject
Throws: IOException
See Also: PdfViewerPreferences
Deprecated: this method will probably disappear in one of the next releases
Row additions to the original Table used to build the PdfTable are processed and pre-rendered, and then the contents are deleted. If the pre-rendered table doesn't fit, then it is fully rendered and its data discarded. There shouldn't be any column change in the underlying Table object. (Contributed by dperezcar@fcc.es)Parameters: table The pre-rendered table obtained from getPdfTable
Returns: true if the table is rendered and emptied.
Throws: DocumentException
See Also: getPdfTable
Throws: DocumentException
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 referencetable is composed and everything is written to the outputstream embedded in a Trailer.
See Also: close
Returns: an XmpMetadata byte array
Deprecated: this method will probably disappear in one of the next releases
Checks if aTable
fits the current page of the PdfDocument
.
Parameters: table the table that has to be checked margin a certain margin
Returns: true
if the Table
fits the page, false
otherwise.
Deprecated: this method will probably disappear in one of the next releases
Checks if aTable
fits the current page of the PdfDocument
.
Parameters: table the table that has to be checked
Returns: true
if the Table
fits the page, false
otherwise.
Deprecated: this method will probably disappear in one of the next releases
Checks if aPdfPTable
fits the current page of the PdfDocument
.
Parameters: table the table that has to be checked margin a certain margin
Returns: true
if the PdfPTable
fits the page, false
otherwise.
Deprecated: this method will probably disappear in one of the next releases
Checks if aPdfPTable
fits the current page of the PdfDocument
.
Parameters: table the table that has to be checked
Returns: true
if the PdfPTable
fits the page, false
otherwise.
Parameters: reader the PdfReader
to free
Throws: IOException on error
See Also: getAcroForm
Parameters: boxName crop, trim, art or bleed
freeReader()
when concatenating many documents and an idea of
the current size is needed.Returns: the approximate size without fonts or templates
Returns: the default colorspaces
Returns: the direct content
Returns: the direct content
Returns: the catalog to change
Returns: Value of property group.
PdfIndirectReference
to the image with a given name.
Parameters: name the name of the image
Returns: a PdfIndirectReference
Parameters: reader the PDF document where the page is pageNumber the page number. The first page is 1
Returns: the template representing the imported page
Returns: the info dictionary
PdfWriter
.
Parameters: document The Document
that has to be written os The OutputStream
the writer has to write to.
Returns: a new PdfWriter
Throws: DocumentException on error
PdfWriter
.
Parameters: document The Document
that has to be written os The OutputStream
the writer has to write to. listener A DocListener
to pass to the PdfDocument.
Returns: a new PdfWriter
Throws: DocumentException on error
Returns: the Optional Content Properties Dictionary
Returns: the outputStreamCounter
PdfPageEvent
for this document or null
if none is set.Returns: the PdfPageEvent
for this document or null
if none is set
Returns: a page number
Parameters: page the page number. The first page is 1
Returns: the reference to the page
Returns: a Rectangle
PdfDocument
associated with this writer.Returns: the PdfDocument
PdfIndirectReference
for an object that
will be created in the future.
Use this method only if you know what you're doing!Returns: the PdfIndirectReference
Deprecated: this method will probably disappear in one of the next releases
Gets a pre-rendered table. (Contributed by dperezcar@fcc.es)Parameters: table Contains the table definition. Its contents are deleted, after being pre-rendered.
Returns: a PdfTable
See Also: getPDFXConformance
Returns: the root outline
Returns: the run direction
Returns: the space/character extra spacing ratio
null
.Returns: the structure tree root
Deprecated: this method will probably disappear in one of the next releases
Sometimes it is necessary to know where the just addedTable
ends.
For instance to avoid to add another table in a page that is ending up, because
the new table will be probably splitted just after the header (it is an
unpleasant effect, isn't it?).
Added on September 8th, 2001
by Francesco De Milato
francesco.demilato@tiscalinet.itParameters: table the Table
Returns: the bottom height of the just added table
Returns: Returns the userunit.
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.
Returns: the 1.5 compression status
See Also: isPdfX
Returns: value of property strictImageSequence
Returns: true
if the document is marked for tagging
Document
has been opened and that
Elements
can be added.
When this method is called, the PDF-document header is written to the outputstream.
See Also: open
Parameters: tp the template to release
Throws: IOException on error
null
argument value only returns the number of pages to process.
It is advisable to issue a Document.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
See Also: PdfDocumentActions
See Also: PdfVersion
Parameters: boxName the box size size the size
Parameters: collection a dictionary of type PdfCollection
Parameters: crop the crop box
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 be PdfName.DEFAULTGRAY
, PdfName.DEFAULTRGB
or PdfName.DEFAULTCMYK
cs the colorspace. A null
or PdfNull
removes any colorspace with the same name
See Also: PdfPageActions
See Also: (byte[], byte[], int, int)
Deprecated: use the methods described in the PdfEncryptionSettings interface
Sets 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.Parameters: userPassword the user password. Can be null or empty ownerPassword the owner password. Can be null or empty permissions the user permissions strength128Bits true
for 128 bit key length, false
for 40 bit key length
Throws: DocumentException if the document is already open
Deprecated: use the methods described in the PdfEncryptionSettings interface
Sets 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.Parameters: strength true
for 128 bit key length, false
for 40 bit key length userPassword the user password. Can be null or empty ownerPassword the owner password. Can be null or empty permissions the user permissions
Throws: DocumentException if the document is already open
Deprecated: use the methods described in the PdfEncryptionSettings interface
Sets 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.Parameters: encryptionType the type of encryption. It can be one of ENCRYPTION_RC4_40, ENCRYPTION_RC4_128 or ENCRYPTION_AES128. Optionally DO_NOT_ENCRYPT_METADATA can be ored to output the metadata in cleartext userPassword the user password. Can be null or empty ownerPassword the owner password. Can be null or empty permissions the user permissions
Throws: DocumentException if the document is already open
If set before opening the document it will also set the pdf version to 1.5.
Parameters: group New value of property group.
See Also: PdfDocumentActions
See Also: setOpenAction
Parameters: outputConditionIdentifier a value outputCondition a value registryName a value info a value destOutputProfile a value
Throws: IOException on error
Parameters: reader the other document checkExistence true
to just check for the existence of a valid output intent
dictionary, false
to insert the dictionary if it exists
Returns: true
if the output intent dictionary exists, false
otherwise
Throws: IOException on error
See Also: PdfPageActions
Parameters: pageEmpty the state
PdfPageEvent
for this document.Parameters: event the PdfPageEvent
for this document
Parameters: pageLabels the page labels
See Also: PdfVersion
See Also: setPdfVersion
See Also: PdfXConformance
Parameters: runDirection the run direction
See Also: PdfAnnotations
spaceCharRatio
times more
than extra character spacing. If the ratio is PdfWriter.NO_SPACE_CHAR_RATIO
then the extra character spacing will be zero.Parameters: spaceCharRatio the ratio between the extra word spacing and the extra character spacing
Parameters: strictImageSequence new value of property strictImageSequence
Parameters: image the image
Throws: PdfException on error DocumentException or error
See Also: setTransition
Parameters: userunit The userunit to set.
Throws: DocumentException on error
See Also: PdfViewerPreferences
Parameters: xmpMetadata The xmpMetadata to set.