Package com.reportmill.pdf
Class PDFFile
- java.lang.Object
- 
- com.reportmill.base.RMObject
- 
- com.reportmill.pdf.PDFFile
 
 
- 
- All Implemented Interfaces:
- RMArchiver.Archiving,- java.lang.Cloneable
 
 public class PDFFile extends RMObject This class represents a PDF file.
- 
- 
Constructor SummaryConstructors Constructor Description PDFFile()Creates a new pfile.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFont(RMFont aFont, int fontCharSet)Adds a font.voidaddImageData(RMImageData im)Adds an image data to the pdf file.PDFBuffergetBuffer()Returns the PDF buffer for this PDF file.byte[]getBytesPDF(RMDocument aDoc)Returns a PDF byte array for a given RMDocument.PDFEncryptorgetEncryptor()byte[]getFileID()Generates and returns a unique file identifier.java.lang.StringgetFileIDString()Returns the file identifier as a hex string.PDFText.FontEntrygetFontEntry(RMFont aFont)Returns the pdf font entry for a specific font.java.util.MapgetFonts()Returns the pdf file's fonts.java.util.MapgetImages()Returns the images for the pdf file.java.util.MapgetInfoDict()Returns the PDF file's info dictionary.PDFPagesTreegetPagesTree()Returns the PDF file's pages tree.java.lang.StringgetVersion()Returns the version of pdf being generated.PDFXTablegetXRefTable()Returns the cross reference table.voidsetAccessPermissions(java.lang.String ownerPwd, java.lang.String userPwd, int accessFlags)Sets pdf user access restrictions.voidsetAuthor(java.lang.String s)Sets the author of the pdf file.voidsetCreator(java.lang.String s)Sets the creator of the pdf file.voidsetUnmodifiable(java.lang.String ownerPwd)Set the access permissions on the file such that the document can be opened by anyone, but the user cannot modify the document in any way.voidsetVersion(float aVersion)Sets the version of the pdf being generated.voidwriteXRefEntry(java.lang.Object anObj)Writes any kind of object to the PDF buffer.intwriteXRefTable()Writes all entry objects to pdf buffer.- 
Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
 
- 
 
- 
- 
- 
Method Detail- 
getVersionpublic java.lang.String getVersion() Returns the version of pdf being generated.
 - 
setVersionpublic void setVersion(float aVersion) Sets the version of the pdf being generated.
 - 
setAccessPermissionspublic void setAccessPermissions(java.lang.String ownerPwd, java.lang.String userPwd, int accessFlags)Sets pdf user access restrictions.The user password is the password that will be required to open the file. The owner password is the password that will be required to make future changes to the security settings, such as the passwords. Either of the passwords may be null. If both passwords are null, the file will not be password protected, but it will still be encrypted. Fine-grained access can be limited by setting accessFlags, to limit such things as printing or editing the file. See com.ribs.pdf.PDFSecurityHandler for a list of the access flag constants. (or the pdf spec v1.6, pp. 99-100) 
 - 
setUnmodifiablepublic void setUnmodifiable(java.lang.String ownerPwd) Set the access permissions on the file such that the document can be opened by anyone, but the user cannot modify the document in any way. To modify these settings in Acrobat, the owner password would have to be provided.
 - 
getEncryptorpublic PDFEncryptor getEncryptor() 
 - 
getBytesPDFpublic byte[] getBytesPDF(RMDocument aDoc) Returns a PDF byte array for a given RMDocument.
 - 
getXRefTablepublic PDFXTable getXRefTable() Returns the cross reference table.
 - 
getInfoDictpublic java.util.Map getInfoDict() Returns the PDF file's info dictionary.
 - 
getPagesTreepublic PDFPagesTree getPagesTree() Returns the PDF file's pages tree.
 - 
setAuthorpublic void setAuthor(java.lang.String s) Sets the author of the pdf file.
 - 
setCreatorpublic void setCreator(java.lang.String s) Sets the creator of the pdf file.
 - 
getFileIDpublic byte[] getFileID() Generates and returns a unique file identifier.
 - 
getFileIDStringpublic java.lang.String getFileIDString() Returns the file identifier as a hex string.
 - 
getFontspublic java.util.Map getFonts() Returns the pdf file's fonts.
 - 
getFontEntrypublic PDFText.FontEntry getFontEntry(RMFont aFont) Returns the pdf font entry for a specific font.
 - 
addFontpublic void addFont(RMFont aFont, int fontCharSet) Adds a font.
 - 
getImagespublic java.util.Map getImages() Returns the images for the pdf file.
 - 
addImageDatapublic void addImageData(RMImageData im) Adds an image data to the pdf file.
 - 
getBufferpublic PDFBuffer getBuffer() Returns the PDF buffer for this PDF file.
 - 
writeXRefTablepublic int writeXRefTable() Writes all entry objects to pdf buffer.
 - 
writeXRefEntrypublic void writeXRefEntry(java.lang.Object anObj) Writes any kind of object to the PDF buffer.
 
- 
 
-