Class PDFFile

All Implemented Interfaces:
RMPropertyChanger, Cloneable
Direct Known Subclasses:
RMPDFWriter

public class PDFFile extends RMObject
This class represents a PDF file.
  • Constructor Details

    • PDFFile

      public PDFFile()
      Creates a new pfile.
  • Method Details

    • getVersion

      public String getVersion()
      Returns the version of pdf being generated.
    • setVersion

      public void setVersion(float aVersion)
      Sets the version of the pdf being generated.
    • setViewerPreferences

      public void setViewerPreferences(Map vprefs)
      Add a viewer preferences dictionary to the file. See section 8.1 of the pdf spec
    • getXRefTable

      public PDFXTable getXRefTable()
      Returns the cross reference table.
    • getInfoDict

      public Map getInfoDict()
      Returns the PDF file's info dictionary.
    • getPagesTree

      public PDFPagesTree getPagesTree()
      Returns the PDF file's pages tree.
    • setAuthor

      public void setAuthor(String s)
      Sets the author of the pdf file.
    • setCreator

      public void setCreator(String s)
      Sets the creator of the pdf file.
    • getFileID

      public byte[] getFileID()
      Generates and returns a unique file identifier.
    • getFileIDString

      public String getFileIDString()
      Returns the file identifier as a hex string.
    • getFonts

      public Map<String,PDFFontEntry> getFonts()
      Returns the pdf file's fonts.
    • getFontEntry

      public PDFFontEntry getFontEntry()
      Returns the current pdf font entry.
    • setFontEntry

      public void setFontEntry(PDFFontEntry aFontEntry)
      Sets the current font entry.
    • getFontEntry

      public PDFFontEntry getFontEntry(RMFont aFont, int fontCharSet)
      Returns the pdf font entry for a specific font.
    • getImages

      public Map<String,String> getImages()
      Returns a map of image data names to image data references.
    • addImageData

      public void addImageData(RMImageData anImageData)
      Adds an image data (uniqued) to file reference table, if not already present.
    • getUniqueImageData

      public RMImageData getUniqueImageData(RMImageData anImageData)
      Returns a unique image data for given image data.
    • writeXRefTable

      public long writeXRefTable(RMPDFWriter aWriter)
      Writes all entry objects to pdf buffer.