Class PDFRenderingUtil

java.lang.Object
org.apache.fop.render.pdf.PDFRenderingUtil

class PDFRenderingUtil extends Object
Utility class which enables all sorts of features that are not directly connected to the normal rendering process.
  • Field Details

    • log

      private static org.apache.commons.logging.Log log
      logging instance
    • userAgent

      private FOUserAgent userAgent
    • pdfDoc

      private PDFDocument pdfDoc
      the PDF Document being created
    • rendererConfig

      private PDFRendererOptionsConfig rendererConfig
    • outputProfile

      private PDFICCStream outputProfile
      the ICC stream used as output profile by this document for PDF/A and PDF/X functionality.
    • sRGBColorSpace

      private PDFICCBasedColorSpace sRGBColorSpace
      the default sRGB color space.
  • Constructor Details

    • PDFRenderingUtil

      PDFRenderingUtil(FOUserAgent userAgent)
  • Method Details

    • initialize

      private void initialize()
    • createFromUserAgent

      protected static PDFRendererOptionsConfig createFromUserAgent(FOUserAgent userAgent)
    • mergeRendererOptionsConfig

      void mergeRendererOptionsConfig(PDFRendererOptionsConfig config)
    • updateInfo

      private void updateInfo()
    • updatePDFProfiles

      private void updatePDFProfiles()
    • addsRGBColorSpace

      private void addsRGBColorSpace() throws IOException
      Throws:
      IOException
    • addDefaultOutputProfile

      private void addDefaultOutputProfile() throws IOException
      Throws:
      IOException
    • addPDFA1OutputIntent

      private void addPDFA1OutputIntent() throws IOException
      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

      private void addPDFXOutputIntent() throws IOException
      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

      public void renderXMPMetadata(XMPMetadata metadata)
    • generateDefaultXMPMetadata

      public void generateDefaultXMPMetadata()
    • renderDictionaryExtension

      public void renderDictionaryExtension(PDFDictionaryAttachment attachment, PDFPage currentPage)
    • addLayer

      public void addLayer(PDFDictionaryExtension extension)
    • addNavigatorAction

      public void addNavigatorAction(PDFDictionaryExtension extension)
    • addNavigator

      public void addNavigator(PDFDictionaryExtension extension)
    • makeArray

      private Object makeArray(Object value)
    • populateArray

      private Object populateArray(PDFArray array, List<?> entries)
    • makeDictionary

      private Object makeDictionary(Object value)
    • populateDictionary

      private Object populateDictionary(PDFDictionary dictionary, List<?> entries)
    • makeDictionaryOrArray

      private Object makeDictionaryOrArray(Object value)
    • hasKeyedEntry

      private boolean hasKeyedEntry(List<?> entries)
    • renderDictionaryExtension

      public void renderDictionaryExtension(PDFDictionaryExtension extension, PDFPage currentPage)
    • augmentDictionary

      private PDFDictionary augmentDictionary(PDFDictionary dictionary, PDFDictionaryExtension extension)
    • augmentDictionary

      private void augmentDictionary(PDFDictionary dictionary, PDFCollectionEntryExtension entry)
    • resolveReference

      private Object resolveReference(PDFReferenceExtension entry)
    • augmentArray

      private PDFArray augmentArray(PDFArray array, PDFArrayExtension extension)
    • augmentArray

      private void augmentArray(PDFArray array, PDFCollectionEntryExtension entry)
    • setupPDFDocument

      public PDFDocument setupPDFDocument(OutputStream out) throws IOException
      Throws:
      IOException
    • generatePageLabel

      public void generatePageLabel(int pageIndex, String pageNumber)
      Generates a page label in the PDF document.
      Parameters:
      pageIndex - the index of the page
      pageNumber - the formatted page number
    • addEmbeddedFile

      public void addEmbeddedFile(PDFEmbeddedFileAttachment embeddedFile) throws IOException
      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