|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.qoppa.pdfViewer.hiObjects.AbstractPDFDocument
com.qoppa.pdfProcess.PDFDocument
PDF Document object. This class provides methods to load, modify, print and save PDF documents.
Documents can be loaded from a file, an input stream or a URL. Use the URL constructor when loading a document from a web server or from a servlet.
| Field Summary |
| Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
PDFDocument()
Creates a blank PDF document. |
|
PDFDocument(InputStream inStream,
IPassword password)
Creates a PDFDocument object from a PDF InputStream. |
|
PDFDocument(PDFSource source,
IPassword password)
Create a PDFDocument object using a PDFSource interface. |
|
PDFDocument(String fileName,
IPassword password)
Loads a PDF document from a file. |
|
PDFDocument(URL url,
IPassword password)
Loads a PDF document from a URL. |
|
| Method Summary | |
void |
addAnnotations(Hashtable annotHash)
This method allows multiple annotations to be added to multiple pages. |
void |
addDocumentListener(IDocumentListener listener)
Internal method to keep track of document events. |
boolean |
addEmbeddedFile(File file)
Embeds a file into this PDF document. |
Layer |
addLayer(String name,
int initialState)
Creates and returns a PDF layer (Optional Content Group). |
void |
appendDocument(PDFDocument appendDoc)
Appends a PDF document to this document. |
void |
appendGIFAsPage(InputStream gifStream,
int dpi)
Creates a new page in the PDF document and adds the GIF image to it. |
void |
appendGIFAsPage(String gifFileName,
int dpi)
Creates a new page in the PDF document and adds the GIF image to it. |
void |
appendImage(File imageFile)
This method appends an image (or series of images) to the current document. |
void |
appendImage(InputStream inStream,
String formatName)
This method appends an image (or series of images) to the current document. |
void |
appendJPEGAsPage(InputStream inStream)
Creates a new page in the PDF document and adds the JPEG image to it. |
void |
appendJPEGAsPage(String jpegFileName)
Creates a new page in the PDF document and adds the JPEG file to it. |
void |
appendJPEGAsPage(String jpegFileName,
int dpi)
Creates a new page in the PDF document and adds the JPEG file to it. |
PDFPage |
appendNewPage(double pageWidth,
double pageHeight)
Creates and appends a new PDFPage to this document. |
PDFPage |
appendPage(PDFPage page)
Appends a page to this document. |
void |
appendPNGAsPage(InputStream inStream)
Creates a new page in the PDF document and adds a PNG image, read from an input stream, to it. |
void |
appendPNGAsPage(String pngFileName)
Creates a new page in the PDF document and adds the PNG file to it. |
void |
appendTextAsPages(InputStream textStream,
TextToPDFSettings settings)
Creates new pages in the PDF document and adds the text, read from an input stream, to them. |
void |
appendTextAsPages(String txtFileName,
TextToPDFSettings settings)
Creates new pages in the PDF document and adds the text from an text file to them. |
void |
appendTIFFAsPages(InputStream inStream)
Appends the pages in a TIFF image from an input stream to the end of this document. |
void |
appendTIFFAsPages(String tiffFileName)
Appends the pages in a TIFF file to the end of this document. |
void |
clearSecurity(String currentPermissionsPwd)
Clears the security for this document. |
Bookmark |
createRootBookmark()
Creates a new root bookmark and saves it in the document catalog. |
void |
deleteAnnotations()
Delete all annotations in the document. |
void |
deletePage(int pageIndex)
Deletes a page from this document. |
Font |
embedFont(InputStream fontStream,
int fontFormat)
Embeds a font in the PDF file. |
Font |
embedFont(String fileName,
int fontFormat)
Embeds a font in the PDF file. |
void |
exportAnnotsAsFDF(OutputStream outStream,
String pathToPDFFile)
Export annotations comments to an output stream in FDF format. |
void |
exportAnnotsAsFDF(String fileName)
Exports annotations comments in FDF format. |
void |
exportAnnotsAsXFDF(OutputStream outStream,
String pathToPDFFile)
Export annotations comments to an output stream in XFDF format. |
void |
exportAnnotsAsXFDF(String fileName)
Exports annotations comments in XFDF format. |
void |
flattenAnnotations(boolean paintNonPrintableAnnots)
Flattens the annotations. |
void |
flattenFields(boolean paintButtons,
boolean paintNonPrintableFields)
Flattens the pdf form fields. |
AcroForm |
getAcroForm()
Returns the AcroForm in this document. |
DocumentInfo |
getDocumentInfo()
Returns an object representing the document metadata information (author, title, etc.). |
Vector |
getEmbeddedFiles()
Returns the list of embedded files in the document (annotations attachments are not part of the list). |
String |
getEncryptionAlgorithm()
Returns the name of the encryption algorithm used to encrypt the document. |
int |
getEncryptionLength()
Returns an int representing the number of bits used in the encryption technique. |
File |
getFile()
Convenience method that returns the file that the PDF document was loaded from. |
String |
getFileModifiedID()
Returns the file modified ID. |
String |
getFileName()
Deprecated. Use getPDFSource().getName() instead |
String |
getFileOriginalID()
Returns the file original ID. |
IPDFPage |
getIPage(int pageIndex)
Internal method, do not use. |
Layer |
getLayer(int layerIndex)
Returns a particular PDF layer given its index. |
int |
getLayerCount()
Returns the number of PDF layers in this document. |
PDFPage |
getPage(int pageIndex)
Returns a page in this document. |
Pageable |
getPageable(PrinterJob pJob)
Returns an object that implements Pageable for this PDF document. |
int |
getPageCount()
Returns the number of pages in this document. |
String |
getPDFFileVersion()
Return the PDF file version for the current document. |
PDFPermissions |
getPermissions()
Returns the permission object for this document. |
PrintSettings |
getPrintSettings()
Get the current PrintSettings object. |
Bookmark |
getRootBookmark()
Returns the 'root' bookmark. |
String |
getText()
Returns the text in the pdf document as a String. |
String |
getText(int pageIndex)
Returns text contained in the specified page of the pdf document as a String. |
static String |
getVersion()
Returns version string for jPDFProcess. |
Vector |
getWords()
Returns all words in the pdf document as a Vector of Strings. |
Vector |
getWords(int pageIndex)
Returns all words contained in the specified page of the pdf document as a Vector of Strings. |
boolean |
hasOpenPassword()
Returns a flag indicating whether this document is encrypted with a 'user' password. |
boolean |
hasPermissionsPassword()
Returns a flag indicating whether this document is encrypted with a 'owner' password. |
void |
importAnnotsFDF(InputStream inStream)
Import annotations comments from an input stream in FDF format. |
void |
importAnnotsFDF(String fileName)
Import annotations comments from a file in FDF Format. |
void |
importAnnotsXFDF(InputStream inStream)
Import AcroForm field data from an input stream in XML format. |
void |
importAnnotsXFDF(String fileName)
Import Acroform fields data from a file in XML Format. |
PDFPage |
insertNewPage(double pageWidth,
double pageHeight,
int index)
Creates a new PDFPage and inserts it into the document at the given position. |
PDFPage |
insertPage(PDFPage page,
int index)
Inserts a page into this document at the given index. |
boolean |
isEncrypted()
Returns a flag indicating whether this document is encrypted. |
boolean |
isPortfolio()
Returns a flag indicating whether this document is a PDF Portfolio. |
static PDFDocument |
loadRTF(String rtfFile,
PageFormat pf)
Creates a PDFDocument from an RTF file. |
void |
movePage(int currentIndex,
int newIndex)
moves an existing page to a new location. |
PreflightResults |
preflightDocument(Profile profile)
This method runs this document through a preflight profile and returns the results. |
PreflightResults |
preflightDocument(Profile profile,
PreflightProgress progress)
This method runs this document through a preflight profile and returns the results. |
int |
print(Graphics graphics,
PageFormat pageFormat,
int pageIndex)
Prints the page. |
void |
print(PrintSettings printSettings)
Prints this PDF document. |
void |
print(String printerName,
PrintSettings printSettings)
Prints this PDF document to the specified printer, by name. |
void |
print(String printerName,
PrintSettings printSettings,
PrintRequestAttributeSet printAttrSet)
Prints this PDF document to the specified printer, by name and passes the print request attribute set to the printer job. |
void |
removeDocumentListener(IDocumentListener listener)
Internal method to keep track of document events. |
boolean |
removeEmbeddedFile(IEmbeddedFile ef)
Remove a file embedded in this document. |
void |
saveDocument(OutputStream outStream)
Saves this document to an output stream. |
void |
saveDocument(String fileName)
Saves this document to a file. |
void |
saveDocumentAsTIFF(OutputStream outStream,
double resDPI,
String tiffCompression)
Save the entire document as a multi-page TIFF image to the given OutputStream. |
void |
saveDocumentAsTIFF(OutputStream outStream,
TIFFOptions options)
Save the entire document as a multi-page TIFF image to an OutputStream. |
void |
setDocumentInfo(DocumentInfo newInfo)
Deprecated. The DocumentInfo object returned by getDocumentInfo() is now a mutable object, so any changes to the object using any of its set methods will be saved with the document. Calls to this method will have no effect. |
void |
setInitialPage(int pageNumber)
Sets the initial page to display. |
static boolean |
setKey(String key)
Method to unlock the production version of the library. |
void |
setMagnification(String magnification)
Sets the magnification at which to display the initial view. |
void |
setPageLayout(String pageLayout)
Changes the value of the page layout key for this document. |
void |
setPageMode(String pageMode)
Changes the value of the page mode viewer preference in the document. |
void |
setPDFSource(PDFSource pdfSource)
|
void |
setPrintSettings(PrintSettings printSettings)
Set the PrintSettings to be used on the next printout. |
void |
setSecurity(String newPermissionsPwd,
String newOpenPwd,
PDFPermissions permissions,
String currentPermissionsPwd,
int encryptType)
Sets the security for this document. |
void |
signDocument(SignatureField signField,
SigningInformation signingInfo)
Signs this document using the given signature field. |
boolean |
usePermissionsPassword(String password)
Tells the PDFDocument object that the permissions password is known, so all permissions are granted. |
| Methods inherited from class com.qoppa.pdfViewer.hiObjects.AbstractPDFDocument |
getDocumentInfo, getInitialPage, getLinesWithPositions, getMagnification, getPageLayout, getPageMode, getPDFSource, getWordsWithPositions |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.qoppa.pdf.dom.IPDFDocument |
getInitialPage, getMagnification, getPageLayout, getPageMode, getPDFSource |
| Constructor Detail |
public PDFDocument(URL url,
IPassword password)
throws PDFException
url - URL pointint to the location of the PDF file.password - An object that provides passwords to open the document, leave null if not needed.
When working with documents that have no passwords, the host application should pass null for the
value of this parameter. When documents are known to have passwords, the host application should
pass an instance of the PDFPassword class that can hold a single
password or a list of passwords.
public PDFDocument(InputStream inStream,
IPassword password)
throws PDFException
inStream - InputStream to read the pdf document from.password - An object that provides passwords to open the document, leave null if not needed.
When working with documents that have no passwords, the host application should pass null for the
value of this parameter. When documents are known to have passwords, the host application should
pass an instance of the PDFPassword class that can hold a single
password or a list of passwords.
public PDFDocument(String fileName,
IPassword password)
throws PDFException
fileName - Name of the PDF file.password - An object that provides passwords to open the document, leave null if not needed.
When working with documents that have no passwords, the host application should pass null for the
value of this parameter. When documents are known to have passwords, the host application should
pass an instance of the PDFPassword class that can hold a single
password or a list of passwords.
public PDFDocument()
throws PDFException
public PDFDocument(PDFSource source,
IPassword password)
throws PDFException
source - The source of the PDF content.password - The password, if any, used to open the document. Set to null if there is no password needed.| Method Detail |
public void appendDocument(PDFDocument appendDoc)
throws PDFException
appendDoc - Document to be appended.
PDFException
public void appendImage(File imageFile)
throws PDFException,
IOException
imageFile - The input image file. The format of the input file is determined by looking
at the extension.
PDFException
IOException
public void appendImage(InputStream inStream,
String formatName)
throws IOException,
PDFException
inStream - The input stream holding the image contents.formatName - The name of the format of the input content data. Valid format names are pdf, tiff,
tif, png, jpg, jpeg and jpe and are case insensitive.
IOException
PDFException
public PDFPage appendPage(PDFPage page)
throws PDFException
page - The page to add to the document.
PDFException
public void appendTIFFAsPages(String tiffFileName)
throws PDFException,
IOException
tiffFileName - The name of the TIFF file to add to this document.
PDFException
IOException
public void appendTIFFAsPages(InputStream inStream)
throws PDFException,
IOException
inStream - The input stream to read the TIFF image from
PDFException
IOException
public void appendJPEGAsPage(String jpegFileName)
throws PDFException,
IOException
jpegFileName - The name of the JPEG file to add to this document.
PDFException
IOException
public void appendJPEGAsPage(InputStream inStream)
throws PDFException,
IOException
inStream - the input stream to read the JPEG image from
PDFException
IOException
public void appendJPEGAsPage(String jpegFileName,
int dpi)
throws PDFException,
IOException
jpegFileName - The name of the JPEG file to add to this document.
PDFException
IOException
public void appendPNGAsPage(String pngFileName)
throws PDFException,
IOException
pngFileName - The name of the PNG file to add to this document.
PDFException
IOException
public void appendPNGAsPage(InputStream inStream)
throws PDFException,
IOException
inStream - The input stream to read the PNG image from.
PDFException
IOException
public void appendGIFAsPage(String gifFileName,
int dpi)
throws PDFException,
IOException
gifFileName - The name of gif filedpi - The DPI value to use when importing the image.
PDFException
IOException
public void appendGIFAsPage(InputStream gifStream,
int dpi)
throws PDFException,
IOException
gifStream - The name of gif filedpi - The DPI value to use when importing the image.
PDFException
IOException
public void movePage(int currentIndex,
int newIndex)
throws PDFException
currentIndex - The current index of the page to move.newIndex - The location to move the page.
PDFException
public PDFPage insertPage(PDFPage page,
int index)
throws PDFException
page - The page to add to the document.index - Location where to insert the new page.
PDFException
public void deletePage(int pageIndex)
throws PDFException
pageIndex - Index of the page to remove.
PDFException
public void exportAnnotsAsFDF(String fileName)
throws PDFException
fileName - The name of the file to export the data to.
PDFException
public void exportAnnotsAsFDF(OutputStream outStream,
String pathToPDFFile)
throws PDFException,
IOException
outStream - The output stream to write the data to.pathToPDFFile - is the relative path from the fdf file to the pdf file name. This parameter can be left null.
This parameter is used to fill the pdf file name entry in the FDF file, the file entry will be set to pathToPDFFile + fileNa
The file entry is used when you open an fdf file to be able to locate the corresponding pdf file.
Example of pathToPDFFile ../qoppa/mydir
PDFException
IOException
public void exportAnnotsAsXFDF(String fileName)
throws PDFException
fileName - The name of the file to export the data to.
PDFException
public void importAnnotsFDF(InputStream inStream)
throws PDFException
inStream - The input stream in FDF format to read the data from.
PDFException
public void importAnnotsFDF(String fileName)
throws PDFException
fileName - The name of the FDF file to import the data from.
PDFException
public void importAnnotsXFDF(String fileName)
throws PDFException
fileName - The name of the XML file to import the data from.
PDFException
public void importAnnotsXFDF(InputStream inStream)
throws PDFException
inStream - The input stream in XML format to read the data from.
PDFException
public void exportAnnotsAsXFDF(OutputStream outStream,
String pathToPDFFile)
throws PDFException
outStream - The output stream to write the data to.pathToPDFFile - is the relative path from the fdf file to the pdf file name. This parameter can be left null.
This parameter is used to fill the pdf file name entry in the FDF file, the file entry will be set to pathToPDFFile + fileNa
The file entry is used when you open an fdf file to be able to locate the corresponding pdf file.
Example of pathToPDFFile ../qoppa/mydir
IOException
PDFException
public PDFPage appendNewPage(double pageWidth,
double pageHeight)
throws PDFException
pageWidth - Width of the page in 72DPI.pageHeight - Height of the page in 72DPI.
PDFException
public PDFPage insertNewPage(double pageWidth,
double pageHeight,
int index)
throws PDFException
pageWidth - Width of the page in 72DPI.pageHeight - Height of the page in 72DPI.
PDFException
public void saveDocument(String fileName)
throws IOException,
PDFException
fileName - Name of the file to save the document.
IOException
PDFException
public void saveDocumentAsTIFF(OutputStream outStream,
double resDPI,
String tiffCompression)
throws PDFException,
IOException
outStream - The stream to save the image to.resDPI - Dots per inch at which to render the image, 72 is the native PDF resolution and is equivalent to 100% scale..tiffCompression - The type of TIFF compression to use. This value needs to be one of
these predefined values:PDFException
IOException
public void saveDocumentAsTIFF(OutputStream outStream,
TIFFOptions options)
throws PDFException,
IOException
TIFFOptions object as an argument to describe various
TIFF options when saving the file.
outStream - The stream to save the image to.options - Options to use when saving the TIFF file.
PDFException
IOException
public void saveDocument(OutputStream outStream)
throws IOException,
PDFException
outStream - OutputStream where the document will be written to.
IOException
PDFExceptionpublic static boolean setKey(String key)
key - Production key.
public static PDFDocument loadRTF(String rtfFile,
PageFormat pf)
throws PDFException,
IOException,
BadLocationException
rtfFile - - Name of the RTF file.pf - - PageFormat to use when creating pages in the PDF document.
PDFException
IOException
BadLocationExceptionpublic static String getVersion()
public PDFPage getPage(int pageIndex)
pageIndex - Index of the page to return.public Pageable getPageable(PrinterJob pJob)
getPageable in interface IPDFDocumentpJob - PrinterJob object where the Pageable will be used.
public int getPageCount()
getPageCount in interface IPDFDocumentpublic IPDFPage getIPage(int pageIndex)
getIPage in interface IPDFDocumentpageIndex - Index of the page to return.public File getFile()
getFile in interface IPDFDocumentpublic String getFileName()
getFileName in interface IPDFDocumentpublic String getFileOriginalID()
getFileOriginalID in interface IPDFDocumentpublic String getFileModifiedID()
getFileModifiedID in interface IPDFDocument
public Layer addLayer(String name,
int initialState)
throws PDFException
name - The name of the layer. This name will show up on a PDF viewer to turn the layer on or off.initialState - The initial visibility state of the layer. This determines whether the layer will be
visible or not when the PDF document is opened. Valid values for this are Layer.STATE_ON or Layer.STATE_OFF.
PDFExceptionpublic void setPrintSettings(PrintSettings printSettings)
setPrintSettings in interface IPDFDocumentprintSettings - Settings to use on the next printout.
public void setSecurity(String newPermissionsPwd,
String newOpenPwd,
PDFPermissions permissions,
String currentPermissionsPwd,
int encryptType)
throws PDFException
newPermissionsPwd - The document's permissions password.newOpenPwd - The document's open password.permissions - Permission object.currentPermissionsPwd - The current permissions password in the document, if any. This password is needed to be able to change the passwords and
permissions in a document.encryptType - - The encryption type to use, this value can be either PDFPermissions.ENCRYPTION_RC4 or PDFPermissions.ENCRYPTION_AES.
PDFPermissionException - If currentPermissionsPwd is invalid.
PDFException
public void clearSecurity(String currentPermissionsPwd)
throws PDFException
currentPermissionsPwd - The current permissions password in the document, if any. This password is needed to be able to change the passwords and
permissions in a document.
PDFPermissionException - If currentPermissionsPwd is invalid.
PDFExceptionpublic boolean hasOpenPassword()
public boolean isEncrypted()
public int getEncryptionLength()
public String getEncryptionAlgorithm()
public int print(Graphics graphics,
PageFormat pageFormat,
int pageIndex)
throws PrinterException
print in interface PrintablePrinterException
public void print(PrintSettings printSettings)
throws PDFPermissionException,
PrinterException
print in interface IPDFDocumentprintSettings - Print job settings. Use this object to tell jPDFProcess how to print the document. If null, the library will print using default
settings.
PDFPermissionException
PrinterException
public void print(String printerName,
PrintSettings printSettings)
throws PDFPermissionException,
PrinterException
printSettings - Print job settings. Use this object to tell the library how to print the document. If null, the library will print using default
settings.printerName - The name of the printer to print to. If this parameter is set to null, the method will print to the default printer.
PrinterException - This exception is thrown if the printer is not found or if there is an error while printing.
PDFPermissionException
public void print(String printerName,
PrintSettings printSettings,
PrintRequestAttributeSet printAttrSet)
throws PDFPermissionException,
PrinterException
printSettings - Print job settings. Use this object to tell the library how to print the document. If null, the library will print using default
settings.printerName - The name of the printer to print to. If this parameter is set to null, the method will print to the default printer.printAttrSet - The attribute set to pass to the printer. This parameter simply gets passed through to the printer job to set options
such as the media tray, chromaticity and others. If null is passed, the print job will use default attributes.
PrinterException - This exception is thrown if the printer is not found or if there is an error while printing.
PDFPermissionExceptionpublic boolean hasPermissionsPassword()
public final PDFPermissions getPermissions()
getPermissions in interface IPDFDocumentpublic PrintSettings getPrintSettings()
getPrintSettings in interface IPDFDocument
public boolean addEmbeddedFile(File file)
throws IOException,
PDFException
file - The file to embed in the document
IOException
PDFExceptionpublic Vector getEmbeddedFiles()
getEmbeddedFiles in interface IPDFDocument
public boolean removeEmbeddedFile(IEmbeddedFile ef)
throws IOException,
PDFException
ef - the embedded file to remove
IOException
PDFException
public String getText()
throws PDFException
String. Pages are separated with a return char.
getText in interface IPDFDocumentPDFException
public String getText(int pageIndex)
throws PDFException
getText in interface IPDFDocumentpageIndex - is the 0 based page number. pageIndex = 0 is the first page of the document.
PDFException
public Vector getWords()
throws PDFException
Vector of Strings.
PDFException
public Vector getWords(int pageIndex)
throws PDFException
pageIndex - is the 0 based page number. pageIndex = 0 is the first page of the document.
PDFExceptionpublic Bookmark getRootBookmark()
getRootBookmark in interface IPDFDocumentpublic int getLayerCount()
getLayerCount in interface IPDFDocumentpublic Layer getLayer(int layerIndex)
getLayer in interface IPDFDocumentpublic void addDocumentListener(IDocumentListener listener)
addDocumentListener in interface IPDFDocumentpublic void removeDocumentListener(IDocumentListener listener)
removeDocumentListener in interface IPDFDocumentpublic DocumentInfo getDocumentInfo()
getDocumentInfo in interface IPDFDocument
public void setDocumentInfo(DocumentInfo newInfo)
throws PDFException
newInfo - The new document information.
PDFExceptionpublic AcroForm getAcroForm()
getAcroForm in interface IPDFDocument
public void deleteAnnotations()
throws PDFException
PDFException
public void flattenAnnotations(boolean paintNonPrintableAnnots)
throws PDFException
paintNonPrintableAnnots - Flag to indicate whether non-printable annotations should be painted or not.
PDFException
public void flattenFields(boolean paintButtons,
boolean paintNonPrintableFields)
throws PDFException
paintButtons - Flag to indicate whether push buttons should be painted or not.paintNonPrintableFields - Flag to indicate whether non-printable fields should be painted or not.
PDFException
public Bookmark createRootBookmark()
throws PDFException
PDFExceptionpublic String getPDFFileVersion()
public void setPageMode(String pageMode)
throws PDFException
pageMode - The new page mode. This value has to be one of:PDFException
public void setPageLayout(String pageLayout)
throws PDFException
pageLayout - The new page mode. This value has to be one of:PDFException
public void setInitialPage(int pageNumber)
throws PDFException
pageNumber - The page number. Use 0 for first page.
PDFException
public void setMagnification(String magnification)
throws PDFException
magnification - A string magnification. This value has to be one of:PDFException
public void signDocument(SignatureField signField,
SigningInformation signingInfo)
throws PDFException
signField - The field to use to sign the document.signingInfo - Information required to sign the document.
PDFExceptionSignatureAppearance
public Font embedFont(String fileName,
int fontFormat)
throws IOException,
FontFormatException,
PDFException
fileName - Name of the font file.fontFormat - Font format. This can be Font.TRUETYPE_FONT or Font.TYPE1_FONT (if using JDK1.5)
IOException
FontFormatException
PDFException
public Font embedFont(InputStream fontStream,
int fontFormat)
throws IOException,
FontFormatException,
PDFException
fontStream - Name of the font file.fontFormat - Font format. This can be Font.TRUETYPE_FONT or Font.TYPE1_FONT (if using JDK1.5)
IOException
FontFormatException
PDFException
public PreflightResults preflightDocument(Profile profile,
PreflightProgress progress)
throws PDFException
profile - The profile to run.progress - A progress listener that gets notified of the preflighting process progress. This is
an optional parameter and may be left null
PDFException
public PreflightResults preflightDocument(Profile profile)
throws PDFException
profile - The profile to run.
PDFException
public void addAnnotations(Hashtable annotHash)
throws PDFException
Integers for the keys representing the page index. The values in the
hashtable must be Vectors of Annotations.
annotHash - The hashtable of annotations to be added to the document.
PDFException
public boolean usePermissionsPassword(String password)
throws PDFException
password - The permissions password
PDFException
public boolean isPortfolio()
throws PDFException
PDFExceptionpublic void setPDFSource(PDFSource pdfSource)
public void appendTextAsPages(String txtFileName,
TextToPDFSettings settings)
throws PDFException,
IOException
txtFileName - The name of the text file to add to this document.settings - The object to set the text to PDF settings.
PDFException - , IOException
IOException
public void appendTextAsPages(InputStream textStream,
TextToPDFSettings settings)
throws PDFException
textStream - The input stream to read the text from.settings - The object to set the text to PDF settings.
PDFException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||