Package com.reportmill.pdf
Class PDFFile
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.pdf.PDFFile
- All Implemented Interfaces:
- RMArchiver.Archiving,- Cloneable
This class represents a PDF file.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a font.voidAdds an image data to the pdf file.Returns the PDF buffer for this PDF file.byte[]getBytesPDF(RMDocument aDoc) Returns a PDF byte array for a given RMDocument.byte[]Generates and returns a unique file identifier.Returns the file identifier as a hex string.getFontEntry(RMFont aFont) Returns the pdf font entry for a specific font.getFonts()Returns the pdf file's fonts.Returns the images for the pdf file.Returns the PDF file's info dictionary.Returns the PDF file's pages tree.Returns the version of pdf being generated.Returns the cross reference table.voidsetAccessPermissions(String ownerPwd, String userPwd, int accessFlags) Sets pdf user access restrictions.voidSets the author of the pdf file.voidsetCreator(String s) Sets the creator of the pdf file.voidsetUnmodifiable(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(Object anObj) Writes any kind of object to the PDF buffer.intWrites all entry objects to pdf buffer.Methods inherited from class com.reportmill.base.RMObjectclone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
- 
Constructor Details- 
PDFFilepublic PDFFile()Creates a new pfile.
 
- 
- 
Method Details- 
getVersionReturns the version of pdf being generated.
- 
setVersionpublic void setVersion(float aVersion) Sets the version of the pdf being generated.
- 
setAccessPermissionsSets 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) 
- 
setUnmodifiableSet 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.
- 
getEncryptor
- 
getBytesPDFReturns a PDF byte array for a given RMDocument.
- 
getXRefTableReturns the cross reference table.
- 
getInfoDictReturns the PDF file's info dictionary.
- 
getPagesTreeReturns the PDF file's pages tree.
- 
setAuthorSets the author of the pdf file.
- 
setCreatorSets the creator of the pdf file.
- 
getFileIDpublic byte[] getFileID()Generates and returns a unique file identifier.
- 
getFileIDStringReturns the file identifier as a hex string.
- 
getFontsReturns the pdf file's fonts.
- 
getFontEntryReturns the pdf font entry for a specific font.
- 
addFontAdds a font.
- 
getImagesReturns the images for the pdf file.
- 
addImageDataAdds an image data to the pdf file.
- 
getBufferReturns the PDF buffer for this PDF file.
- 
writeXRefTablepublic int writeXRefTable()Writes all entry objects to pdf buffer.
- 
writeXRefEntryWrites any kind of object to the PDF buffer.
 
-