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.Log
logging instanceprivate PDFICCStream
the ICC stream used as output profile by this document for PDF/A and PDF/X functionality.private PDFDocument
the PDF Document being createdprivate PDFRendererOptionsConfig
private PDFICCBasedColorSpace
the default sRGB color space.private FOUserAgent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
addEmbeddedFile
(PDFEmbeddedFileAttachment embeddedFile) Adds an embedded file to the PDF file.void
addLayer
(PDFDictionaryExtension extension) void
addNavigator
(PDFDictionaryExtension extension) void
addNavigatorAction
(PDFDictionaryExtension extension) private void
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).private void
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).private void
private PDFArray
augmentArray
(PDFArray array, PDFArrayExtension extension) private void
augmentArray
(PDFArray array, PDFCollectionEntryExtension entry) private void
augmentDictionary
(PDFDictionary dictionary, PDFCollectionEntryExtension entry) private PDFDictionary
augmentDictionary
(PDFDictionary dictionary, PDFDictionaryExtension extension) protected static PDFRendererOptionsConfig
createFromUserAgent
(FOUserAgent userAgent) void
void
generatePageLabel
(int pageIndex, String pageNumber) Generates a page label in the PDF document.private boolean
hasKeyedEntry
(List<?> entries) private void
private Object
private Object
makeDictionary
(Object value) private Object
makeDictionaryOrArray
(Object value) (package private) void
private Object
populateArray
(PDFArray array, List<?> entries) private Object
populateDictionary
(PDFDictionary dictionary, List<?> entries) void
renderDictionaryExtension
(PDFDictionaryAttachment attachment, PDFPage currentPage) void
renderDictionaryExtension
(PDFDictionaryExtension extension, PDFPage currentPage) void
renderXMPMetadata
(XMPMetadata metadata) private Object
private void
private 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
-
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
-