public class PDFFile extends RMObject
Constructor and Description |
---|
PDFFile()
Creates a new pfile.
|
Modifier and Type | Method and Description |
---|---|
void |
addFont(RMFont aFont,
int fontCharSet)
Adds a font.
|
void |
addImageData(RMImageData im)
Adds an image data to the pdf file.
|
PDFBuffer |
getBuffer()
Returns the PDF buffer for this PDF file.
|
byte[] |
getBytesPDF(RMDocument aDoc)
Returns a PDF byte array for a given RMDocument.
|
PDFEncryptor |
getEncryptor() |
byte[] |
getFileID()
Generates and returns a unique file identifier.
|
java.lang.String |
getFileIDString()
Returns the file identifier as a hex string.
|
PDFText.FontEntry |
getFontEntry(RMFont aFont)
Returns the pdf font entry for a specific font.
|
java.util.Map |
getFonts()
Returns the pdf file's fonts.
|
java.util.Map |
getImages()
Returns the images for the pdf file.
|
java.util.Map |
getInfoDict()
Returns the PDF file's info dictionary.
|
PDFPagesTree |
getPagesTree()
Returns the PDF file's pages tree.
|
java.lang.String |
getVersion()
Returns the version of pdf being generated.
|
PDFXTable |
getXRefTable()
Returns the cross reference table.
|
void |
setAccessPermissions(java.lang.String ownerPwd,
java.lang.String userPwd,
int accessFlags)
Sets pdf user access restrictions.
|
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 |
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.
|
void |
setVersion(float aVersion)
Sets the version of the pdf being generated.
|
void |
writeXRefEntry(java.lang.Object anObj)
Writes any kind of object to the PDF buffer.
|
int |
writeXRefTable()
Writes all entry objects to pdf buffer.
|
clone, copy, didChange, didUndo, getAnimAttribute, getClassNameShort, initWithArchiver, undoClone, undoCopy, undoEquals
public java.lang.String getVersion()
public void setVersion(float aVersion)
public void setAccessPermissions(java.lang.String ownerPwd, java.lang.String userPwd, int accessFlags)
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)
public void setUnmodifiable(java.lang.String ownerPwd)
public PDFEncryptor getEncryptor()
public byte[] getBytesPDF(RMDocument aDoc)
public PDFXTable getXRefTable()
public java.util.Map getInfoDict()
public PDFPagesTree getPagesTree()
public void setAuthor(java.lang.String s)
public void setCreator(java.lang.String s)
public byte[] getFileID()
public java.lang.String getFileIDString()
public java.util.Map getFonts()
public PDFText.FontEntry getFontEntry(RMFont aFont)
public void addFont(RMFont aFont, int fontCharSet)
public java.util.Map getImages()
public void addImageData(RMImageData im)
public PDFBuffer getBuffer()
public int writeXRefTable()
public void writeXRefEntry(java.lang.Object anObj)