com.lowagie.text.pdf
class PdfStamperImp extends PdfWriter
| Nested Class Summary | |
|---|---|
| static class | PdfStamperImp.PageStamp |
| Field Summary | |
|---|---|
| protected AcroFields | acroFields |
| protected boolean | append |
| boolean | closed |
| protected boolean | fieldsAdded |
| protected HashMap | fieldTemplates |
| RandomAccessFileOrArray | file |
| protected boolean | flat |
| protected boolean | flatFreeText |
| protected int | initialXrefSize |
| protected IntHashtable | marked |
| IntHashtable | myXref |
| protected int[] | namePtr |
| protected PdfAction | openAction |
| HashMap | pagesToContent Integer(page number) -> PageStamp |
| protected HashSet | partialFlattening |
| PdfReader | reader |
| HashMap | readers2file |
| HashMap | readers2intrefs |
| boolean | rotateContents Holds value of property rotateContents. |
| protected int | sigFlags |
| protected boolean | useVp |
| protected PdfViewerPreferencesImp | viewerPreferences |
| Constructor Summary | |
|---|---|
| PdfStamperImp(PdfReader reader, OutputStream os, char pdfVersion, boolean append) Creates new PdfStamperImp. | |
| Method Summary | |
|---|---|
| void | addAnnotation(PdfAnnotation annot) |
| void | addAnnotation(PdfAnnotation annot, PdfDictionary pageN) |
| void | addAnnotation(PdfAnnotation annot, int page) |
| void | addComments(FdfReader fdf) |
| void | addDocumentField(PdfIndirectReference ref) |
| void | addFieldResources() |
| void | addFileAttachments() |
| void | addOrder(PdfLayer parent, PdfArray arr, Map ocgmap)
Recursive method to reconstruct the documentOCGorder variable in the writer. |
| void | addViewerPreference(PdfName key, PdfObject value) Adds a viewer preference |
| void | alterContents() |
| void | alterResources(PdfStamperImp.PageStamp ps) |
| void | applyRotation(PdfDictionary pageN, ByteBuffer out) |
| void | close(HashMap moreInfo) |
| void | correctAcroFieldPages(int page) |
| void | deleteOutlines() |
| void | eliminateAcroformObjects() |
| void | expandFields(PdfFormField field, ArrayList allAnnots) |
| static void | findAllObjects(PdfReader reader, PdfObject obj, IntHashtable hits) |
| void | flatFields() |
| void | flatFreeTextFields() |
| AcroFields | getAcroFields() |
| PdfContentByte | getDirectContent() |
| PdfContentByte | getDirectContentUnder() |
| protected int | getNewObjectNumber(PdfReader reader, int number, int generation) |
| PdfContentByte | getOverContent(int pageNum) |
| PdfIndirectReference | getPageReference(int page) |
| PdfStamperImp.PageStamp | getPageStamp(int pageNum) |
| Map | getPdfLayers()
Gets the PdfLayer objects in an existing document as a Map
with the names/titles of the layers as keys. |
| RandomAccessFileOrArray | getReaderFile(PdfReader reader) |
| PdfContentByte | getUnderContent(int pageNum) |
| void | insertPage(int pageNumber, Rectangle mediabox) |
| boolean | isAppend()
Getter for property append. |
| boolean | isContentWritten() |
| boolean | isRotateContents() Getter for property rotateContents. |
| void | makePackage(PdfCollection collection)
Adds or replaces the Collection Dictionary in the Catalog. |
| protected void | markUsed(PdfObject obj) |
| protected void | markUsed(int num) |
| static void | moveRectangle(PdfDictionary dic2, PdfReader r, int pageImported, PdfName key, String name) |
| void | outlineTravel(PRIndirectReference outline) |
| boolean | partialFormFlattening(String name) |
| protected void | readOCProperties()
Reads the OCProperties dictionary from the catalog of the existing document
and fills the documentOCG, documentOCGorder and OCGRadioGroup variables in PdfWriter.
|
| void | registerReader(PdfReader reader, boolean openFile) |
| void | replacePage(PdfReader r, int pageImported, int pageReplaced) |
| void | setAdditionalAction(PdfName actionType, PdfAction action) Additional-actions defining the actions to be taken in
response to various trigger events affecting the document
as a whole. |
| void | setDuration(int seconds)
Always throws an UnsupportedOperationException. |
| void | setDuration(int seconds, int page)
Sets the display duration for the page (for presentations) |
| void | setFormFlattening(boolean flat) |
| void | setFreeTextFlattening(boolean flat) |
| void | setJavaScript() |
| void | setOpenAction(PdfAction action) |
| void | setOpenAction(String name) |
| void | setOutlines() |
| void | setPageAction(PdfName actionType, PdfAction action) Always throws an UnsupportedOperationException. |
| void | setPageAction(PdfName actionType, PdfAction action, int page)
Sets the open and close page additional action. |
| void | setRotateContents(boolean rotateContents) Setter for property rotateContents. |
| void | setSigFlags(int f)
Set the signature flags. |
| void | setThumbnail(Image image) |
| void | setThumbnail(Image image, int page) |
| void | setTransition(PdfTransition transition)
Always throws an UnsupportedOperationException. |
| void | setTransition(PdfTransition transition, int page)
Sets the transition for the page |
| void | setViewerPreferences(int preferences)
Sets the viewer preferences. |
| void | sweepKids(PdfObject obj) |
| void | unRegisterReader(PdfReader reader) |
Parameters: reader the read PDF os the output destination pdfVersion the new pdf version or '\0' to keep the same version as the original document append
Throws: DocumentException on error IOException
See Also: addAnnotation
Parameters: fdf
Throws: IOException
Parameters: parent a parent PdfLayer (can be null) arr an array possibly containing children for the parent PdfLayer ocgmap a HashMap with indirect reference Strings as keys and PdfLayer objects as values.
Since: 2.1.2
Parameters: key a key for a viewer preference value the value for the viewer preference
See Also: PdfViewerPreferences
See Also: PdfWriter
Returns: a Map with all the PdfLayers in the document (and the name/title of the layer as key)
Since: 2.1.2
Returns: Value of property append.
Returns: Value of property rotateContents.
Parameters: collection the new collection dictionary.
Since: 2.1.2
Parameters: reader openFile
Throws: IOException
DOCUMENT_CLOSE,
WILL_SAVE, DID_SAVE, WILL_PRINT
and DID_PRINT.
Parameters: actionType the action type action the action to execute in response to the trigger
Throws: PdfException on invalid action type
UnsupportedOperationException.Parameters: seconds ignore
Parameters: seconds the number of seconds to display the page. A negative value removes the entry page the page where the duration will be applied. The first page is 1
See Also: setOpenAction
See Also: PdfWriter
UnsupportedOperationException.Parameters: actionType ignore action ignore
Throws: PdfException ignore
See Also: PdfStamper
Parameters: actionType the action type. It can be PdfWriter.PAGE_OPEN
or PdfWriter.PAGE_CLOSE action the action to perform page the page where the action will be applied. The first page is 1
Throws: PdfException if the action type is invalid
Parameters: rotateContents New value of property rotateContents.
Parameters: f the flags. This flags are ORed with current ones
See Also: setThumbnail
UnsupportedOperationException.Parameters: transition ignore
Parameters: transition the transition object. A null removes the transition page the page where the transition will be applied. The first page is 1
Parameters: preferences the viewer preferences
See Also: PdfWriter
Parameters: reader