Package org.apache.fop.render.pdf
Class PDFRenderingUtil
java.lang.Object
org.apache.fop.render.pdf.PDFRenderingUtil
Utility class which enables all sorts of features that are not directly connected to the
normal rendering process.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.commons.logging.Loglogging instanceprivate PDFICCStreamthe ICC stream used as output profile by this document for PDF/A and PDF/X functionality.private PDFDocumentthe PDF Document being createdprivate PDFRendererOptionsConfigprivate PDFICCBasedColorSpacethe default sRGB color space.private FOUserAgent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidaddEmbeddedFile(PDFEmbeddedFileAttachment embeddedFile) Adds an embedded file to the PDF file.voidaddLayer(PDFDictionaryExtension extension) voidaddNavigator(PDFDictionaryExtension extension) voidaddNavigatorAction(PDFDictionaryExtension extension) private voidAdds an OutputIntent to the PDF as mandated by PDF/A-1 when uncalibrated color spaces are used (which is true if we use DeviceRGB to represent sRGB colors).private voidAdds an OutputIntent to the PDF as mandated by PDF/X when uncalibrated color spaces are used (which is true if we use DeviceRGB to represent sRGB colors).private voidprivate PDFArrayaugmentArray(PDFArray array, PDFArrayExtension extension) private voidaugmentArray(PDFArray array, PDFCollectionEntryExtension entry) private voidaugmentDictionary(PDFDictionary dictionary, PDFCollectionEntryExtension entry) private PDFDictionaryaugmentDictionary(PDFDictionary dictionary, PDFDictionaryExtension extension) protected static PDFRendererOptionsConfigcreateFromUserAgent(FOUserAgent userAgent) voidvoidgeneratePageLabel(int pageIndex, String pageNumber) Generates a page label in the PDF document.private booleanhasKeyedEntry(List<?> entries) private voidprivate Objectprivate ObjectmakeDictionary(Object value) private ObjectmakeDictionaryOrArray(Object value) (package private) voidprivate ObjectpopulateArray(PDFArray array, List<?> entries) private ObjectpopulateDictionary(PDFDictionary dictionary, List<?> entries) voidrenderDictionaryExtension(PDFDictionaryAttachment attachment, PDFPage currentPage) voidrenderDictionaryExtension(PDFDictionaryExtension extension, PDFPage currentPage) private voidrenderExtension(PDFPage currentPage, ExtensionAttachment extension) voidrenderXMPMetadata(XMPMetadata metadata) private Objectprivate voidprivate void
-
Field Details
-
log
private static org.apache.commons.logging.Log loglogging instance -
userAgent
-
pdfDoc
the PDF Document being created -
rendererConfig
-
outputProfile
the ICC stream used as output profile by this document for PDF/A and PDF/X functionality. -
sRGBColorSpace
the default sRGB color space.
-
-
Constructor Details
-
PDFRenderingUtil
PDFRenderingUtil(FOUserAgent userAgent)
-
-
Method Details
-
initialize
private void initialize() -
createFromUserAgent
-
mergeRendererOptionsConfig
-
updateInfo
private void updateInfo() -
updatePDFProfiles
private void updatePDFProfiles() -
addsRGBColorSpace
- Throws:
IOException
-
addDefaultOutputProfile
- Throws:
IOException
-
addPDFA1OutputIntent
Adds an OutputIntent to the PDF as mandated by PDF/A-1 when uncalibrated color spaces are used (which is true if we use DeviceRGB to represent sRGB colors).- Throws:
IOException- in case of an I/O problem
-
addPDFXOutputIntent
Adds an OutputIntent to the PDF as mandated by PDF/X when uncalibrated color spaces are used (which is true if we use DeviceRGB to represent sRGB colors).- Throws:
IOException- in case of an I/O problem
-
renderXMPMetadata
-
generateDefaultXMPMetadata
public void generateDefaultXMPMetadata() -
renderDictionaryExtension
-
addLayer
-
makeArray
-
populateArray
-
makeDictionary
-
populateDictionary
-
makeDictionaryOrArray
-
hasKeyedEntry
-
renderDictionaryExtension
-
renderExtension
-
augmentDictionary
-
augmentDictionary
-
resolveReference
-
augmentArray
-
augmentArray
-
setupPDFDocument
- Throws:
IOException
-
generatePageLabel
Generates a page label in the PDF document.- Parameters:
pageIndex- the index of the pagepageNumber- the formatted page number
-
addEmbeddedFile
Adds an embedded file to the PDF file.- Parameters:
embeddedFile- the object representing the embedded file to be added- Throws:
IOException- if an I/O error occurs
-