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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a font.void
Adds 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.void
setAccessPermissions
(String ownerPwd, String userPwd, int accessFlags) Sets pdf user access restrictions.void
Sets the author of the pdf file.void
setCreator
(String s) Sets the creator of the pdf file.void
setUnmodifiable
(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.void
setVersion
(float aVersion) Sets the version of the pdf being generated.void
writeXRefEntry
(Object anObj) Writes any kind of object to the PDF buffer.int
Writes all entry objects to pdf buffer.Methods inherited from class com.reportmill.base.RMObject
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
-
Constructor Details
-
PDFFile
public PDFFile()Creates a new pfile.
-
-
Method Details
-
getVersion
Returns the version of pdf being generated. -
setVersion
public void setVersion(float aVersion) Sets the version of the pdf being generated. -
setAccessPermissions
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)
-
setUnmodifiable
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. -
getEncryptor
-
getBytesPDF
Returns a PDF byte array for a given RMDocument. -
getXRefTable
Returns the cross reference table. -
getInfoDict
Returns the PDF file's info dictionary. -
getPagesTree
Returns the PDF file's pages tree. -
setAuthor
Sets the author of the pdf file. -
setCreator
Sets the creator of the pdf file. -
getFileID
public byte[] getFileID()Generates and returns a unique file identifier. -
getFileIDString
Returns the file identifier as a hex string. -
getFonts
Returns the pdf file's fonts. -
getFontEntry
Returns the pdf font entry for a specific font. -
addFont
Adds a font. -
getImages
Returns the images for the pdf file. -
addImageData
Adds an image data to the pdf file. -
getBuffer
Returns the PDF buffer for this PDF file. -
writeXRefTable
public int writeXRefTable()Writes all entry objects to pdf buffer. -
writeXRefEntry
Writes any kind of object to the PDF buffer.
-