Class PdfCopyFieldsImp
java.lang.Object
com.gitlab.pdftk_java.com.lowagie.text.DocWriter
com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfWriter
com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfCopyFieldsImp
- All Implemented Interfaces:
DocListener
,ElementListener
,EventListener
-
Nested Class Summary
Nested classes/interfaces inherited from class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfWriter
PdfWriter.PdfBody, PdfWriter.PdfTrailer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList
private ArrayList
(package private) boolean
protected static final HashMap
(package private) ArrayList
(package private) HashMap
(package private) RandomAccessFileOrArray
(package private) PdfDictionary
private static final PdfName
(package private) Document
protected List
(package private) ArrayList
(package private) ArrayList
(package private) HashMap
(package private) ArrayList
(package private) HashMap
(package private) PdfDictionary
private HashMap
(package private) HashMap
protected static final HashMap
private static final Integer
Fields inherited from class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfWriter
ALLOW_ASSEMBLY, ALLOW_COPY, ALLOW_DEGRADED_PRINTING, ALLOW_FILL_IN, ALLOW_MODIFY_ANNOTATIONS, ALLOW_MODIFY_CONTENTS, ALLOW_PRINTING, ALLOW_SCREENREADERS, AllowAssembly, AllowCopy, AllowDegradedPrinting, AllowFillIn, AllowModifyAnnotations, AllowModifyContents, AllowPrinting, AllowScreenReaders, body, CenterWindow, colorNumber, compressStreams, crypto, currentPageNumber, currentPdfReaderInstance, defaultColorspace, DID_PRINT, DID_SAVE, DirectionL2R, DirectionR2L, DisplayDocTitle, DO_NOT_ENCRYPT_METADATA, DOCUMENT_CLOSE, documentColors, documentExtGState, documentFonts, documentOCG, documentOCGorder, documentPatterns, documentProperties, documentShadingPatterns, documentShadings, documentSpotPatterns, EMBEDDED_FILES_ONLY, ENCRYPTION_AES_128, ENCRYPTION_MASK, fileID, filterStreams, FitWindow, fontNumber, formXObjects, formXObjectsCounter, fullCompression, GENERATION_MAX, group, HEADER, HideMenubar, HideToolbar, HideWindowUI, imageDictionary, importedPages, INVALID_ENCRYPTION, NO_SPACE_CHAR_RATIO, NonFullScreenPageModeUseNone, NonFullScreenPageModeUseOC, NonFullScreenPageModeUseOutlines, NonFullScreenPageModeUseThumbs, OCGRadioGroup, OCProperties, PAGE_CLOSE, PAGE_OPEN, PageLayoutOneColumn, PageLayoutSinglePage, PageLayoutTwoColumnLeft, PageLayoutTwoColumnRight, PageLayoutTwoPageLeft, PageLayoutTwoPageRight, PageModeFullScreen, PageModeUseAttachments, PageModeUseNone, PageModeUseOC, PageModeUseOutlines, PageModeUseThumbs, pageReferences, patternColorspaceCMYK, patternColorspaceGRAY, patternColorspaceRGB, patternNumber, PDF_VERSION_1_2, PDF_VERSION_1_3, PDF_VERSION_1_4, PDF_VERSION_1_5, PDF_VERSION_1_6, PDF_VERSION_1_7, PDFX1A2001, PDFX32002, PDFXKEY_CMYK, PDFXKEY_COLOR, PDFXKEY_FONT, PDFXKEY_GSTATE, PDFXKEY_IMAGE, PDFXKEY_LAYER, PDFXKEY_RGB, PDFXNONE, prevxref, PrintScalingNone, RUN_DIRECTION_DEFAULT, RUN_DIRECTION_LTR, RUN_DIRECTION_NO_BIDI, RUN_DIRECTION_RTL, runDirection, SIGNATURE_APPEND_ONLY, SIGNATURE_EXISTS, SPACE_CHAR_RATIO_DEFAULT, STANDARD_ENCRYPTION_128, STANDARD_ENCRYPTION_40, STRENGTH128BITS, STRENGTH40BITS, structureTreeRoot, tagged, userunit, VERSION_1_0, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, ViewerPreferencesMask, WILL_PRINT, WILL_SAVE, xmpMetadata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
addPageOffsetToField
(HashMap fd, int pageOffset) private void
adjustTabOrder
(PdfArray annots, PdfIndirectReference ind, PdfNumber nn) protected PdfArray
branchForm
(HashMap level, PdfIndirectReference parent, String fname) void
close()
Signals that theDocument
was closed and that no otherElements
will be added.protected void
closeIt()
protected void
(package private) void
createWidgets
(ArrayList list, AcroFields.Item item) protected PdfDictionary
getCatalog
(PdfIndirectReference rootObj) protected int
getNewObjectNumber
(PdfReader reader, int number, int generation) protected PdfIndirectReference
getPageReference
(int page) Gets a reference to a page existing or not.(package private) RandomAccessFileOrArray
getReaderFile
(PdfReader reader) protected boolean
protected boolean
protected boolean
(package private) void
mergeField
(String name, AcroFields.Item item) (package private) void
(package private) void
void
openDoc()
(package private) void
propagate
(PdfObject obj, PdfIndirectReference refo, boolean restricted) void
setOutlines
(List outlines) Sets the bookmarks.protected boolean
Methods inherited from class com.gitlab.pdftk_java.com.lowagie.text.pdf.PdfWriter
add, addAnnotation, addAnnotation, addCalculationOrder, addDirectTemplateSimple, addJavaScript, addJavaScript, addJavaScript, addLocalDestinations, addOCGRadioGroup, addSharedObjectsToBody, addSimple, addSimple, addSimpleExtGState, addSimplePattern, addSimplePatternColorspace, addSimpleProperty, addSimpleShading, addSimpleShadingPattern, addToBody, addToBody, addToBody, addToBody, addToBody, addToBody, checkPDFXConformance, eliminateFontSubset, freeReader, getAcroForm, getColorspaceName, getCurrentDocumentSize, getCurrentPage, getCurrentPageNumber, getDefaultColorspace, getDirectContent, getDirectContentUnder, getEncryption, getExtraCatalog, getFileID, getGroup, getImageReference, getImportedPage, getIndirectReferenceNumber, getInfo, getOCProperties, getOs, getPageEvent, getPageNumber, getPdfDocument, getPdfIndirectReference, getPDFXConformance, getRoot, getRootOutline, getRunDirection, getSpaceCharRatio, getStructureTreeRoot, getUserunit, getVerticalPosition, isFullCompression, isPaused, isStrictImageSequence, isTagged, open, propertyExists, registerLayer, releaseTemplate, reorderPages, resetContent, setAdditionalAction, setBoxSize, setCropBoxSize, setDefaultColorspace, setDuration, setEncryption, setEncryption, setFileID, setFullCompression, setGroup, setLinearPageMode, setOpenAction, setOpenAction, setOutputIntents, setOutputIntents, setPageAction, setPageEmpty, setPageEvent, setPageLabels, setPdfVersion, setPDFXConformance, setRunDirection, setSigFlags, setSpaceCharRatio, setStrictImageSequence, setTagged, setTransition, setUserunit, setViewerPreferences, setXmpMetadata
Methods inherited from class com.gitlab.pdftk_java.com.lowagie.text.DocWriter
add, addTabs, clearTextWrap, flush, getISOBytes, hasMarkupAttributes, isCloseStream, newPage, pause, resetFooter, resetHeader, resetPageCount, resume, setCloseStream, setMarginMirroring, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart
-
Field Details
-
iTextTag
-
zero
-
readers
ArrayList readers -
readers2intrefs
HashMap readers2intrefs -
pages2intrefs
HashMap pages2intrefs -
visited
HashMap visited -
fields
ArrayList fields -
file
-
fieldTree
HashMap fieldTree -
pageRefs
ArrayList pageRefs -
pageDics
ArrayList pageDics -
resources
PdfDictionary resources -
form
PdfDictionary form -
newBookmarks
-
closing
boolean closing -
nd
Document nd -
tabOrder
-
calculationOrder
-
calculationOrderRefs
-
widgetKeys
-
fieldKeys
-
-
Constructor Details
-
PdfCopyFieldsImp
PdfCopyFieldsImp(OutputStream os) throws DocumentException, IOException - Throws:
DocumentException
IOException
-
PdfCopyFieldsImp
PdfCopyFieldsImp(OutputStream os, char pdfVersion) throws DocumentException, IOException - Throws:
DocumentException
IOException
-
-
Method Details
-
propagate
- Throws:
IOException
-
adjustTabOrder
-
branchForm
protected PdfArray branchForm(HashMap level, PdfIndirectReference parent, String fname) throws IOException - Throws:
IOException
-
createAcroForms
- Throws:
IOException
-
close
public void close()Description copied from class:PdfWriter
Signals that theDocument
was closed and that no otherElements
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.
- Specified by:
close
in interfaceDocListener
- Overrides:
close
in classPdfWriter
-
closeIt
- Throws:
DocumentException
IOException
-
addPageOffsetToField
-
createWidgets
-
mergeField
-
mergeWithMaster
-
mergeFields
void mergeFields() -
getPageReference
Description copied from class:PdfWriter
Gets 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.- Overrides:
getPageReference
in classPdfWriter
- Parameters:
page
- the page number. The first page is 1- Returns:
- the reference to the page
-
getCatalog
- Overrides:
getCatalog
in classPdfWriter
- Throws:
DocumentException
-
getNewReference
-
getNewObjectNumber
- Overrides:
getNewObjectNumber
in classPdfWriter
-
isVisited
-
isVisited
-
setVisited
-
isPage
-
getReaderFile
- Overrides:
getReaderFile
in classPdfWriter
-
setOutlines
Sets the bookmarks. The list structure is defined inSimpleBookmark#
.- Parameters:
outlines
- the bookmarks ornull
to remove any
-
openDoc
public void openDoc()
-