Class PDFFile
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.rm.pdf.writer.PDFFile
-
- All Implemented Interfaces:
RMPropertyChanger
,java.lang.Cloneable
- Direct Known Subclasses:
RMPDFWriter
public class PDFFile extends RMObject
This class represents a PDF file.
-
-
Constructor Summary
Constructors Constructor Description PDFFile()
Creates a new pfile.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addImageData(RMImageData anImageData)
Adds an image data (uniqued) to file reference table, if not already present.byte[]
getFileID()
Generates and returns a unique file identifier.java.lang.String
getFileIDString()
Returns the file identifier as a hex string.PDFFontEntry
getFontEntry()
Returns the current pdf font entry.PDFFontEntry
getFontEntry(RMFont aFont, int fontCharSet)
Returns the pdf font entry for a specific font.java.util.Map<java.lang.String,PDFFontEntry>
getFonts()
Returns the pdf file's fonts.java.util.Map<java.lang.String,java.lang.String>
getImages()
Returns a map of image data names to image data references.java.util.Map
getInfoDict()
Returns the PDF file's info dictionary.PDFPagesTree
getPagesTree()
Returns the PDF file's pages tree.RMImageData
getUniqueImageData(RMImageData anImageData)
Returns a unique image data for given image data.java.lang.String
getVersion()
Returns the version of pdf being generated.PDFXTable
getXRefTable()
Returns the cross reference table.void
setAuthor(java.lang.String s)
Sets the author of the pdf file.void
setCreator(java.lang.String s)
Sets the creator of the pdf file.void
setFontEntry(PDFFontEntry aFontEntry)
Sets the current font entry.void
setVersion(float aVersion)
Sets the version of the pdf being generated.void
setViewerPreferences(java.util.Map vprefs)
Add a viewer preferences dictionary to the file.int
writeXRefTable(RMPDFWriter aWriter)
Writes all entry objects to pdf buffer.-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange, toString
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getVersion
public java.lang.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(java.util.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 java.util.Map getInfoDict()
Returns the PDF file's info dictionary.
-
getPagesTree
public PDFPagesTree getPagesTree()
Returns the PDF file's pages tree.
-
setAuthor
public void setAuthor(java.lang.String s)
Sets the author of the pdf file.
-
setCreator
public void setCreator(java.lang.String s)
Sets the creator of the pdf file.
-
getFileID
public byte[] getFileID()
Generates and returns a unique file identifier.
-
getFileIDString
public java.lang.String getFileIDString()
Returns the file identifier as a hex string.
-
getFonts
public java.util.Map<java.lang.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 java.util.Map<java.lang.String,java.lang.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 int writeXRefTable(RMPDFWriter aWriter)
Writes all entry objects to pdf buffer.
-
-