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 PdfWriter
PdfWriter.PdfBody, PdfWriter.PdfTrailer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayListprivate ArrayList(package private) booleanprotected static final HashMap(package private) ArrayList(package private) HashMap(package private) RandomAccessFileOrArray(package private) PdfDictionaryprivate static final PdfName(package private) Documentprotected List(package private) ArrayList(package private) ArrayList(package private) HashMap(package private) ArrayList(package private) HashMap(package private) PdfDictionaryprivate HashMap(package private) HashMapprotected static final HashMapprivate static final IntegerFields inherited from class 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) voidaddPageOffsetToField(HashMap fd, int pageOffset) private voidadjustTabOrder(PdfArray annots, PdfIndirectReference ind, PdfNumber nn) protected PdfArraybranchForm(HashMap level, PdfIndirectReference parent, String fname) voidclose()Signals that theDocumentwas closed and that no otherElementswill be added.protected voidcloseIt()protected void(package private) voidcreateWidgets(ArrayList list, AcroFields.Item item) protected PdfDictionarygetCatalog(PdfIndirectReference rootObj) protected intgetNewObjectNumber(PdfReader reader, int number, int generation) protected PdfIndirectReferencegetPageReference(int page) Gets a reference to a page existing or not.(package private) RandomAccessFileOrArraygetReaderFile(PdfReader reader) protected booleanprotected booleanprotected boolean(package private) voidmergeField(String name, AcroFields.Item item) (package private) void(package private) voidvoidopenDoc()(package private) voidpropagate(PdfObject obj, PdfIndirectReference refo, boolean restricted) voidsetOutlines(List outlines) Sets the bookmarks.protected booleanMethods inherited from class 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, setXmpMetadataMethods inherited from class 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:
DocumentExceptionIOException
-
PdfCopyFieldsImp
PdfCopyFieldsImp(OutputStream os, char pdfVersion) throws DocumentException, IOException - Throws:
DocumentExceptionIOException
-
-
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:PdfWriterSignals 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 referencetable is composed and everything is written to the outputstream embedded in a Trailer.
- Specified by:
closein interfaceDocListener- Overrides:
closein classPdfWriter
-
closeIt
- Throws:
DocumentExceptionIOException
-
addPageOffsetToField
-
createWidgets
-
mergeField
-
mergeWithMaster
-
mergeFields
void mergeFields() -
getPageReference
Description copied from class:PdfWriterGets 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:
getPageReferencein classPdfWriter- Parameters:
page- the page number. The first page is 1- Returns:
- the reference to the page
-
getCatalog
- Overrides:
getCatalogin classPdfWriter- Throws:
DocumentException
-
getNewReference
-
getNewObjectNumber
- Overrides:
getNewObjectNumberin classPdfWriter
-
isVisited
-
isVisited
-
setVisited
-
isPage
-
getReaderFile
- Overrides:
getReaderFilein classPdfWriter
-
setOutlines
Sets the bookmarks. The list structure is defined inSimpleBookmark#.- Parameters:
outlines- the bookmarks ornullto remove any
-
openDoc
public void openDoc()
-