com.itextpdf.text.pdf
Class PdfAStamperImp
java.lang.Object
com.itextpdf.text.DocWriter
com.itextpdf.text.pdf.PdfWriter
com.itextpdf.text.pdf.PdfAStamperImp
- All Implemented Interfaces:
- DocListener, ElementListener, PdfAnnotations, PdfDocumentActions, PdfEncryptionSettings, PdfPageActions, PdfRunDirection, PdfVersion, PdfViewerPreferences, EventListener
public class PdfAStamperImp
- extends PdfWriter
Extension to PdfStamperImp that will attempt to keep a file
in conformance with the PDF/A standard.
| Fields inherited from class com.itextpdf.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, colorProfile, compressionLevel, crypto, currentPageNumber, currentPdfReaderInstance, defaultColorspace, DID_PRINT, DID_SAVE, directContent, directContentUnder, 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_AES_256, extraCatalog, FitWindow, fontNumber, formXObjects, formXObjectsCounter, fullCompression, GENERATION_MAX, group, HideMenubar, HideToolbar, HideWindowUI, imageDictionary, JBIG2Globals, markAll, markInlineElementsOnly, newBookmarks, NO_SPACE_CHAR_RATIO, NonFullScreenPageModeUseNone, NonFullScreenPageModeUseOC, NonFullScreenPageModeUseOutlines, NonFullScreenPageModeUseThumbs, OCGLocked, OCGRadioGroup, OCProperties, originalFileID, PAGE_CLOSE, PAGE_OPEN, pageDictEntries, PageLayoutOneColumn, PageLayoutSinglePage, PageLayoutTwoColumnLeft, PageLayoutTwoColumnRight, PageLayoutTwoPageLeft, PageLayoutTwoPageRight, PageModeFullScreen, PageModeUseAttachments, PageModeUseNone, PageModeUseOC, PageModeUseOutlines, PageModeUseThumbs, pageReferences, patternColorspaceCMYK, patternColorspaceGRAY, patternColorspaceRGB, patternNumber, pdf, pdf_version, PDF_VERSION_1_2, PDF_VERSION_1_3, PDF_VERSION_1_4, PDF_VERSION_1_5, PDF_VERSION_1_6, PDF_VERSION_1_7, pdfIsoConformance, PDFX1A2001, PDFX32002, PDFXNONE, prevxref, PrintScalingNone, readerInstances, root, 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, tabs, tagged, taggingMode, ttfUnicodeWriter, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, WILL_PRINT, WILL_SAVE, xmpMetadata, xmpWriter |
| Fields inherited from class com.itextpdf.text.DocWriter |
closeStream, document, EQUALS, FORWARD, GT, LT, NEWLINE, open, os, pageSize, pause, QUOTE, SPACE, TAB |
|
Method Summary |
void |
addAnnotation(PdfAnnotation arg0)
|
void |
addComments(FdfReader arg0)
|
protected void |
addFieldResources()
|
protected void |
addFileAttachments()
|
PdfIndirectObject |
addToBody(PdfObject object)
|
PdfIndirectObject |
addToBody(PdfObject object,
boolean inObjStm)
|
PdfIndirectObject |
addToBody(PdfObject object,
int refNumber)
|
PdfIndirectObject |
addToBody(PdfObject object,
int refNumber,
boolean inObjStm)
|
PdfIndirectObject |
addToBody(PdfObject object,
PdfIndirectReference ref)
|
PdfIndirectObject |
addToBody(PdfObject object,
PdfIndirectReference ref,
boolean inObjStm)
|
void |
addViewerPreference(PdfName arg0,
PdfObject arg1)
|
protected void |
alterContents()
|
protected void |
close(Map<String,String> arg0)
|
protected void |
close(PdfIndirectReference arg0,
int arg1)
|
void |
createXmpMetadata()
|
protected XmpWriter |
createXmpWriter(ByteArrayOutputStream baos,
HashMap<String,String> info)
|
protected XmpWriter |
createXmpWriter(ByteArrayOutputStream baos,
PdfDictionary info)
|
protected void |
flatFields()
|
protected void |
flatFreeTextFields()
|
protected Counter |
getCounter()
|
PdfContentByte |
getDirectContent()
|
PdfContentByte |
getDirectContentUnder()
|
protected int |
getNewObjectNumber(PdfReader arg0,
int arg1,
int arg2)
|
PdfIndirectReference |
getPageReference(int arg0)
|
Map<String,PdfLayer> |
getPdfLayers()
|
protected TtfUnicodeWriter |
getTtfUnicodeWriter()
|
protected PdfIsoConformance |
initPdfIsoConformance()
|
boolean |
isPdfIso()
|
protected void |
markUsed(int arg0)
|
protected void |
markUsed(PdfObject arg0)
|
protected void |
readColorProfile()
|
protected void |
readOCProperties()
|
void |
registerReader(PdfReader arg0,
boolean arg1)
|
void |
setAdditionalAction(PdfName arg0,
PdfAction arg1)
|
void |
setDuration(int arg0)
|
protected void |
setJavaScript()
|
void |
setOpenAction(PdfAction arg0)
|
void |
setOpenAction(String arg0)
|
protected void |
setOutlines()
|
void |
setOutputIntents(String outputConditionIdentifier,
String outputCondition,
String registryName,
String info,
ICC_Profile colorProfile)
|
void |
setPageAction(PdfName arg0,
PdfAction arg1)
|
void |
setPDFXConformance(int pdfx)
Always throws an exception since PDF/X conformance level cannot be set for PDF/A conformant documents. |
void |
setSigFlags(int arg0)
|
void |
setThumbnail(Image arg0)
|
void |
setTransition(PdfTransition arg0)
|
protected void |
setViewerPreferences()
|
void |
setViewerPreferences(int arg0)
|
void |
unRegisterReader(PdfReader arg0)
|
| Methods inherited from class com.itextpdf.text.pdf.PdfWriter |
add, addCalculationOrder, addDeveloperExtension, addDirectImageSimple, addDirectImageSimple, addFileAttachment, addFileAttachment, addFileAttachment, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addJavaScript, addNamedDestination, addNamedDestinations, addOCGRadioGroup, addPageDictEntry, addSharedObjectsToBody, addXFormsToBody, buildStructTreeRootForTagged, checkElementRole, checkPdfIsoConformance, checkPdfIsoConformance, clearTextWrap, close, fillOCProperties, flushAcroFields, flushTaggedObjects, freeReader, getAcroForm, getBoxSize, getBoxSize, getCatalog, getColorProfile, getCompressionLevel, getCurrentDocumentSize, getCurrentPageNumber, getDefaultColorspace, getExtraCatalog, getGroup, getImportedPage, getIndirectReferenceNumber, getInfo, getInstance, getInstance, getOCProperties, getOs, getPageDictEntries, getPageEvent, getPageNumber, getPageSize, getPdfIndirectReference, getPdfReaderInstance, getPDFXConformance, getReferenceJBIG2Globals, getRootOutline, getRunDirection, getSpaceCharRatio, getStandardStructElems, getStructureTreeRoot, getTabs, getVerticalPosition, getXmpWriter, isFullCompression, isPageEmpty, isPdfX, isRgbTransparencyBlending, isStrictImageSequence, isTagged, isUserProperties, lockLayer, needToBeMarkedInContent, open, releaseTemplate, reorderPages, resetPageDictEntries, setAtLeastPdfVersion, setBoxSize, setCollection, setCompressionLevel, setCropBoxSize, setDefaultColorspace, setEncryption, setEncryption, setEncryption, setEncryption, setEncryption, setFullCompression, setGroup, setInitialLeading, setLanguage, setLinearPageMode, setOutlines, setOutputIntents, setOutputIntents, setPageEmpty, setPageEvent, setPageLabels, setPageViewport, setPageXmpMetadata, setPdfVersion, setPdfVersion, setRgbTransparencyBlending, setRunDirection, setSpaceCharRatio, setStrictImageSequence, setTabs, setTagged, setTagged, setUserProperties, setUserunit, setXmpMetadata, writeKeyInfo, writeOutlines |
| Methods inherited from class com.itextpdf.text.DocWriter |
add, addTabs, flush, getISOBytes, isCloseStream, isPaused, newPage, pause, resetPageCount, resume, setCloseStream, setMarginMirroring, setMarginMirroringTopBottom, setMargins, setPageCount, setPageSize, write, write, writeEnd, writeEnd, writeMarkupAttributes, writeStart |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COUNTER
protected Counter COUNTER
file
protected RandomAccessFileOrArray file
closed
protected boolean closed
acroFields
protected AcroFields acroFields
flat
protected boolean flat
flatFreeText
protected boolean flatFreeText
namePtr
protected int[] namePtr
partialFlattening
protected HashSet<String> partialFlattening
useVp
protected boolean useVp
viewerPreferences
protected PdfViewerPreferencesImp viewerPreferences
fieldTemplates
protected HashSet<PdfTemplate> fieldTemplates
fieldsAdded
protected boolean fieldsAdded
sigFlags
protected int sigFlags
append
protected boolean append
marked
protected IntHashtable marked
initialXrefSize
protected int initialXrefSize
openAction
protected PdfAction openAction
readColorProfile
protected void readColorProfile()
setOutputIntents
public void setOutputIntents(String outputConditionIdentifier,
String outputCondition,
String registryName,
String info,
ICC_Profile colorProfile)
throws IOException
- Overrides:
setOutputIntents in class PdfWriter
- Throws:
IOException- See Also:
PdfStamperImp#setOutputIntents(String, String, String, String, ICC_Profile)
isPdfIso
public boolean isPdfIso()
- Overrides:
isPdfIso in class PdfWriter
- See Also:
PdfWriter.isPdfIso()
setPDFXConformance
public void setPDFXConformance(int pdfx)
- Always throws an exception since PDF/X conformance level cannot be set for PDF/A conformant documents.
- Overrides:
setPDFXConformance in class PdfWriter
- Parameters:
pdfx -
getTtfUnicodeWriter
protected TtfUnicodeWriter getTtfUnicodeWriter()
- Overrides:
getTtfUnicodeWriter in class PdfWriter
- See Also:
PdfWriter.getTtfUnicodeWriter()
createXmpWriter
protected XmpWriter createXmpWriter(ByteArrayOutputStream baos,
PdfDictionary info)
throws IOException
- Overrides:
createXmpWriter in class PdfWriter
- Throws:
IOException- See Also:
PdfStamperImp#createXmpWriter(java.io.ByteArrayOutputStream, com.itextpdf.text.pdf.PdfDictionary)
createXmpWriter
protected XmpWriter createXmpWriter(ByteArrayOutputStream baos,
HashMap<String,String> info)
throws IOException
- Overrides:
createXmpWriter in class PdfWriter
- Throws:
IOException
initPdfIsoConformance
protected PdfIsoConformance initPdfIsoConformance()
- Overrides:
initPdfIsoConformance in class PdfWriter
- See Also:
PdfWriter.initPdfIsoConformance()
getCounter
protected Counter getCounter()
addToBody
public PdfIndirectObject addToBody(PdfObject object)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
addToBody
public PdfIndirectObject addToBody(PdfObject object,
boolean inObjStm)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
addToBody
public PdfIndirectObject addToBody(PdfObject object,
PdfIndirectReference ref,
boolean inObjStm)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
addToBody
public PdfIndirectObject addToBody(PdfObject object,
PdfIndirectReference ref)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
addToBody
public PdfIndirectObject addToBody(PdfObject object,
int refNumber)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
addToBody
public PdfIndirectObject addToBody(PdfObject object,
int refNumber,
boolean inObjStm)
throws IOException
- Overrides:
addToBody in class PdfWriter
- Throws:
IOException
setViewerPreferences
protected void setViewerPreferences()
close
protected void close(Map<String,String> arg0)
throws IOException
- Throws:
IOException
close
protected void close(PdfIndirectReference arg0,
int arg1)
throws IOException
- Throws:
IOException
alterContents
protected void alterContents()
throws IOException
- Throws:
IOException
getNewObjectNumber
protected int getNewObjectNumber(PdfReader arg0,
int arg1,
int arg2)
- Overrides:
getNewObjectNumber in class PdfWriter
registerReader
public void registerReader(PdfReader arg0,
boolean arg1)
throws IOException
- Throws:
IOException
unRegisterReader
public void unRegisterReader(PdfReader arg0)
addComments
public void addComments(FdfReader arg0)
throws IOException
- Throws:
IOException
flatFields
protected void flatFields()
flatFreeTextFields
protected void flatFreeTextFields()
getPageReference
public PdfIndirectReference getPageReference(int arg0)
- Overrides:
getPageReference in class PdfWriter
addAnnotation
public void addAnnotation(PdfAnnotation arg0)
- Specified by:
addAnnotation in interface PdfAnnotations- Overrides:
addAnnotation in class PdfWriter
addFieldResources
protected void addFieldResources()
throws IOException
- Throws:
IOException
setJavaScript
protected void setJavaScript()
throws IOException
- Throws:
IOException
addFileAttachments
protected void addFileAttachments()
throws IOException
- Throws:
IOException
setOutlines
protected void setOutlines()
throws IOException
- Throws:
IOException
setViewerPreferences
public void setViewerPreferences(int arg0)
- Specified by:
setViewerPreferences in interface PdfViewerPreferences- Overrides:
setViewerPreferences in class PdfWriter
addViewerPreference
public void addViewerPreference(PdfName arg0,
PdfObject arg1)
- Specified by:
addViewerPreference in interface PdfViewerPreferences- Overrides:
addViewerPreference in class PdfWriter
setSigFlags
public void setSigFlags(int arg0)
- Specified by:
setSigFlags in interface PdfAnnotations- Overrides:
setSigFlags in class PdfWriter
setPageAction
public void setPageAction(PdfName arg0,
PdfAction arg1)
throws PdfException
- Specified by:
setPageAction in interface PdfPageActions- Overrides:
setPageAction in class PdfWriter
- Throws:
PdfException
setDuration
public void setDuration(int arg0)
- Specified by:
setDuration in interface PdfPageActions- Overrides:
setDuration in class PdfWriter
setTransition
public void setTransition(PdfTransition arg0)
- Specified by:
setTransition in interface PdfPageActions- Overrides:
setTransition in class PdfWriter
markUsed
protected void markUsed(PdfObject arg0)
markUsed
protected void markUsed(int arg0)
setAdditionalAction
public void setAdditionalAction(PdfName arg0,
PdfAction arg1)
throws PdfException
- Specified by:
setAdditionalAction in interface PdfDocumentActions- Overrides:
setAdditionalAction in class PdfWriter
- Throws:
PdfException
setOpenAction
public void setOpenAction(PdfAction arg0)
- Specified by:
setOpenAction in interface PdfDocumentActions- Overrides:
setOpenAction in class PdfWriter
setOpenAction
public void setOpenAction(String arg0)
- Specified by:
setOpenAction in interface PdfDocumentActions- Overrides:
setOpenAction in class PdfWriter
setThumbnail
public void setThumbnail(Image arg0)
- Overrides:
setThumbnail in class PdfWriter
getDirectContentUnder
public PdfContentByte getDirectContentUnder()
- Overrides:
getDirectContentUnder in class PdfWriter
getDirectContent
public PdfContentByte getDirectContent()
- Overrides:
getDirectContent in class PdfWriter
readOCProperties
protected void readOCProperties()
getPdfLayers
public Map<String,PdfLayer> getPdfLayers()
createXmpMetadata
public void createXmpMetadata()
- Overrides:
createXmpMetadata in class PdfWriter
Copyright © 2014. All Rights Reserved.