PdfViewer
Inheritance: java.lang.Object, com.aspose.pdf.facades.IVentureLicenseTarget
All Implemented Interfaces: com.aspose.pdf.facades.IFacade
public final class PdfViewer extends IVentureLicenseTarget implements IFacade
Represents a class to view or print a pdf.
Constructors
Constructor | Description |
---|---|
PdfViewer() | Initializes new PdfViewer object. |
PdfViewer(IDocument document) | Initializes new PdfViewer object. |
Fields
Field | Description |
---|---|
PdfQueryPageSettings | Adds/removes subscription on the last page printing event. |
CustomPrint | |
EndPrint | Adds/removes subscription on the last page printing event. |
Methods
Method | Description |
---|---|
isShowHiddenAreas() | This method is Deprecated Gets flag that controls visibility of hidden areas on the page. |
setShowHiddenAreas(boolean value) | |
getPrintStatus() | Gets the result of printing job. |
getUseIntermidiateImage() | Gets the using of conversion of pdf page into intermidiate png file during printing in file mode. |
setUseIntermidiateImage(boolean value) | Sets the using of conversion of pdf page into intermidiate png file during printing in file mode. |
getCopiesPrinted() | Gets copies printed |
getCoordinateType() | Gets the page coordinate type (Media/Crop boxes). |
setCoordinateType(int value) | Sets the page coordinate type (Media/Crop boxes). |
getPrintAsImage() | Gets a mode for PdfViewer to print as image. |
setPrintAsImage(boolean value) | Sets a mode for PdfViewer to print as image. |
getPageCount() | Gets page count of the current Pdf file. |
getPassword() | Gets input document password. |
setPassword(String value) | Sets input document password. |
getPrintPageDialog() | Gets a bool value that indicates whether produce the page number dialog when printing. |
setPrintPageDialog(boolean value) | Sets a boolean value that indicates whether produce the page number dialog when printing. |
getPrintAsGrayscale() | Gets or sets a bool value that indicates whether the page is being printed as grayscale. |
setPrintAsGrayscale(boolean value) | Gets or sets a bool value that indicates whether the page is being printed as grayscale. |
getPrinterJobName() | Gets name of document in printer queue when document is printed. |
setPrinterJobName(String value) | Sets name of document in printer queue when document is printed. |
getFormPresentationMode() | Gets form presentation mode. |
setFormPresentationMode(int value) | Sets form presentation mode. |
getRenderingOptions() | Gets rendering options. |
setRenderingOptions(RenderingOptions value) | Sets rendering options. |
getVerticalAlignment() | Gets a value that indicates vertical alignment |
setVerticalAlignment(VerticalAlignment value) | Sets a value that indicates vertical alignment |
getHorizontalAlignment() | Gets a value that indicates horizontal alignment |
setHorizontalAlignment(HorizontalAlignment value) | Sets a value that indicates horizontal alignment |
getAutoResize() | Sets a bool value that indicates whether the file be printed with optimized size. |
setAutoResize(boolean value) | Sets a bool value that indicates whether the file be printed with optimized size. |
getAutoRotate() | Gets a bool value that indicates whether the file be printed with auto rotation |
setAutoRotate(boolean value) | Sets a bool value that indicates whether the file be printed with auto rotation |
getAutoRotateMode() | Gets an AutoRotateMode value that indicates direction of rotation |
setAutoRotateMode(int value) | Sets an AutoRotateMode value that indicates direction of rotation |
getResolution() | Gets or sets resolution during viewing and printing. |
setResolution(int value) | Sets resolution during viewing and printing. |
printLargePdf(String filePath) | Opens and prints a large Pdf file. |
printLargePdf(InputStream inputStream) | Opens and prints a large Pdf stream. |
printLargePdf(String filePath, PdfPrinterSettings printerSettings) | Opens and prints a large Pdf file with specified printer settings. |
printLargePdf(InputStream inputStream, PdfPrinterSettings printerSettings) | Opens and prints a large Pdf stream with specified printer settings. |
printLargePdf(String filePath, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings) | Opens and prints a large Pdf file with specified page settings and printer settings. |
printLargePdf(InputStream inputStream, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings) | Opens and prints a large Pdf stream with specified page settings and printer settings. |
decodeAllPages() | Get pages of current pdf file. |
decodePage(int pageNumber) | Decodes a page of one Pdf file. |
printDocumentWithSettings(PrintPageSettings pageSettings, PdfPrinterSettings printerSettings) | Prints the Pdf document with settings. |
printDocumentWithSettings(PdfPrinterSettings printerSettings) | Prints the Pdf document with printer settings. |
printDocument() | Prints the Pdf document using default printer. |
getDefaultPageSettings() | Gets the default page settings. |
getDefaultPrinterSettings() | Gets the default printer settings. |
openPdfFile(String filePath) | Opens a Pdf file, but does not actually decode the pages of the Pdf file. |
openPdfFile(InputStream inputStream) | Opens a Pdf file stream. |
closePdfFile() | Closes the current Pdf file. |
decodePageToImage(int pageNumber, ImageType imageFormat) | Decodes page to BufferedImage |
getScaleFactor() | Gets a floating point value that indicates scale factor. |
setScaleFactor(float value) | Sets a floating point value that indicates scale factor. |
bindPdf(String srcFile) | Initializes the facade. |
bindPdf(InputStream srcStream) | Initializes the facade. |
bindPdf(IDocument srcDoc) | Initializes the facade. |
save(String destFile) | Saves the result PDF document to file. |
save(InputStream destStream) | Saves the result PDF document to stream. |
close() | Closes the current Pdf file. |
dispose() | Disposes the facade resources. |
PdfViewer()
public PdfViewer()
Initializes new PdfViewer object.
PdfViewer(IDocument document)
public PdfViewer(IDocument document)
Initializes new PdfViewer object.
Parameters:
Parameter | Type | Description |
---|---|---|
document | IDocument | Document object. |
PdfQueryPageSettings
public final PdfEvent<PdfQueryPageSettingsEventHandler> PdfQueryPageSettings
Adds/removes subscription on the last page printing event.
CustomPrint
public final Event<System.EventHandler<CustomPrintEventArgs>> CustomPrint
EndPrint
public final PdfEvent<System.Drawing.Printing.PrintEventHandler> EndPrint
Adds/removes subscription on the last page printing event.
isShowHiddenAreas()
public boolean isShowHiddenAreas()
This method is Deprecated Gets flag that controls visibility of hidden areas on the page.
Returns: boolean - boolean value
setShowHiddenAreas(boolean value)
public void setShowHiddenAreas(boolean value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
getPrintStatus()
public Object getPrintStatus()
Gets the result of printing job. If success than null; otherwise, exception object.
Returns: java.lang.Object - exception object or null
getUseIntermidiateImage()
public boolean getUseIntermidiateImage()
Gets the using of conversion of pdf page into intermidiate png file during printing in file mode. Use it when the size of output file is important.
Returns: boolean - boolean value.
setUseIntermidiateImage(boolean value)
public void setUseIntermidiateImage(boolean value)
Sets the using of conversion of pdf page into intermidiate png file during printing in file mode. Use it when the size of output file is important.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value. |
getCopiesPrinted()
public int getCopiesPrinted()
Gets copies printed
Returns: int - int value
getCoordinateType()
public int getCoordinateType()
Gets the page coordinate type (Media/Crop boxes). CropBox value is used by default.
Returns: int - PageCoordinateType element
setCoordinateType(int value)
public void setCoordinateType(int value)
Sets the page coordinate type (Media/Crop boxes). CropBox value is used by default.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | PageCoordinateType element |
getPrintAsImage()
public boolean getPrintAsImage()
Gets a mode for PdfViewer to print as image.
Returns: boolean - boolean value
If true prints always as image (generates image that is printed) If false prints directly to device if all features are supported. In case document contains non-supported features the system may automatically decide to print as image. Default falue is false.
setPrintAsImage(boolean value)
public void setPrintAsImage(boolean value)
Sets a mode for PdfViewer to print as image.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
If true prints always as image (generates image that is printed) If false prints directly to device if all features are supported. In case document contains non-supported features the system may automatically decide to print as image. Default falue is false. |
getPageCount()
public int getPageCount()
Gets page count of the current Pdf file.
Returns: int - return page count.
getPassword()
public String getPassword()
Gets input document password.
Returns: java.lang.String - String value
setPassword(String value)
public void setPassword(String value)
Sets input document password.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
getPrintPageDialog()
public boolean getPrintPageDialog()
Gets a bool value that indicates whether produce the page number dialog when printing.
Returns: boolean - boolean value
setPrintPageDialog(boolean value)
public void setPrintPageDialog(boolean value)
Sets a boolean value that indicates whether produce the page number dialog when printing.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getPrintAsGrayscale()
public boolean getPrintAsGrayscale()
Gets or sets a bool value that indicates whether the page is being printed as grayscale. By default is false.
Default false is false.
Returns: boolean - boolean value
setPrintAsGrayscale(boolean value)
public void setPrintAsGrayscale(boolean value)
Gets or sets a bool value that indicates whether the page is being printed as grayscale. By default is false.
Default false is false.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getPrinterJobName()
public String getPrinterJobName()
Gets name of document in printer queue when document is printed. Default value is file name.
Returns: java.lang.String - String value
setPrinterJobName(String value)
public void setPrinterJobName(String value)
Sets name of document in printer queue when document is printed. Default value is file name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | String value |
getFormPresentationMode()
public int getFormPresentationMode()
Gets form presentation mode.
Returns: int - FormPresentationMode element
setFormPresentationMode(int value)
public void setFormPresentationMode(int value)
Sets form presentation mode.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | FormPresentationMode element |
getRenderingOptions()
public RenderingOptions getRenderingOptions()
Gets rendering options.
Returns: RenderingOptions - RenderingOptions object
setRenderingOptions(RenderingOptions value)
public void setRenderingOptions(RenderingOptions value)
Sets rendering options.
Parameters:
Parameter | Type | Description |
---|---|---|
value | RenderingOptions | RenderingOptions value |
getVerticalAlignment()
public VerticalAlignment getVerticalAlignment()
Gets a value that indicates vertical alignment
Returns: VerticalAlignment - VerticalAlignment element
setVerticalAlignment(VerticalAlignment value)
public void setVerticalAlignment(VerticalAlignment value)
Sets a value that indicates vertical alignment
Parameters:
Parameter | Type | Description |
---|---|---|
value | VerticalAlignment | VerticalAlignment element |
getHorizontalAlignment()
public HorizontalAlignment getHorizontalAlignment()
Gets a value that indicates horizontal alignment
Returns: HorizontalAlignment - HorizontalAlignment element
setHorizontalAlignment(HorizontalAlignment value)
public void setHorizontalAlignment(HorizontalAlignment value)
Sets a value that indicates horizontal alignment
Parameters:
Parameter | Type | Description |
---|---|---|
value | HorizontalAlignment | HorizontalAlignment element |
getAutoResize()
public boolean getAutoResize()
Sets a bool value that indicates whether the file be printed with optimized size.
Returns: boolean - boolean value: If false print page without page scaling. If true print page with scaling to fit to printable area.
setAutoResize(boolean value)
public void setAutoResize(boolean value)
Sets a bool value that indicates whether the file be printed with optimized size.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value: If false print page without page scaling. If true print page with scaling to fit to printable area. |
getAutoRotate()
public boolean getAutoRotate()
Gets a bool value that indicates whether the file be printed with auto rotation
Returns: boolean - boolean value
setAutoRotate(boolean value)
public void setAutoRotate(boolean value)
Sets a bool value that indicates whether the file be printed with auto rotation
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | boolean value |
getAutoRotateMode()
public int getAutoRotateMode()
Gets an AutoRotateMode value that indicates direction of rotation
Returns: int - AutoRotateMode element
setAutoRotateMode(int value)
public void setAutoRotateMode(int value)
Sets an AutoRotateMode value that indicates direction of rotation
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | AutoRotateMode element |
getResolution()
public int getResolution()
Gets or sets resolution during viewing and printing. The higher resolution, the slower speed. The default value is 150.
Returns: int - int value
setResolution(int value)
public void setResolution(int value)
Sets resolution during viewing and printing. The higher resolution, the slower speed. The default value is 150.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int | int value |
printLargePdf(String filePath)
public void printLargePdf(String filePath)
Opens and prints a large Pdf file. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize(true); // print the file with adjusted size
viewer.setAutoRotate(true); // print the file with adjusted rotation
viewer.setPrintPageDialog(false);// do not produce the page number dialog when
// printing
viewer.setPrintLargePdf("d:\test.pdf");
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The path of Pdf file. |
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly. |
printLargePdf(InputStream inputStream)
public void printLargePdf(InputStream inputStream)
Opens and prints a large Pdf stream. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.printPageDialog=false;//do not produce the page number dialog when printing
viewer.printLargePdf(new MemoryStream(File.ReadAllBytes(@"d:\test.pdf")));
viewer.closePdfFile();
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly.
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | The pdf stream to be opened and printed.. |
printLargePdf(String filePath, PdfPrinterSettings printerSettings)
public void printLargePdf(String filePath, PdfPrinterSettings printerSettings)
Opens and prints a large Pdf file with specified printer settings. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.setPrintPageDialog ( false);//do not produce the page number dialog when printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName ( prtdoc.getPrinterSettings().getPrinterName());
viewer.printLargePdf("d:\\test.pdf",ps);
viewer.closePdfFile();
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The path of Pdf file. |
printerSettings | PdfPrinterSettings | The printer settings. |
printLargePdf(InputStream inputStream, PdfPrinterSettings printerSettings)
public void printLargePdf(InputStream inputStream, PdfPrinterSettings printerSettings)
Opens and prints a large Pdf stream with specified printer settings. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize(true); // print the file with adjusted size
viewer.setAutoRotate(true); // print the file with adjusted rotation
viewer.setPrintPageDialog(false); // do not produce the page number dialog when
// printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName(prtdoc.getPrinterSettings().getPrinterName());
viewer.printLargePdf(new FileInputStream("d:\\middleware.pdf"), ps);
viewer.closePdfFile();
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly.
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | The pdf stream to be opened and printed.. |
printerSettings | PdfPrinterSettings | The printer settings. |
printLargePdf(String filePath, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
public void printLargePdf(String filePath, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
Opens and prints a large Pdf file with specified page settings and printer settings. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize(true); // print the file with adjusted size
viewer.setAutoRotate(true); // print the file with adjusted rotation
viewer.setPrintPageDialog(false); // do not produce the page number dialog when
// printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName(prtdoc.getPrinterSettings().getPrinterName());
PageSettings pgs = new PageSettings();
pgs.setPaperSize(new PaperSize("A4", 827, 1169));
pgs.setMargins(new Margins(0, 0, 0, 0));
viewer.printLargePdf("d:\\test.pdf", pgs, ps);
viewer.closePdfFile();
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The path of Pdf file. |
pageSettings | PrintPageSettings | The page settings. |
printerSettings | PdfPrinterSettings | The printer settings. |
printLargePdf(InputStream inputStream, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
public void printLargePdf(InputStream inputStream, PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
Opens and prints a large Pdf stream with specified page settings and printer settings. If your Pdf file has hundreds of pages or more or its size is more than 3 MB, this method is recommended to get better performance.
PdfViewer viewer = new PdfViewer();
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.setPrintPageDialog ( false);//do not produce the page number dialog when printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName ( prtdoc.getPrinterSettings().getPrinterName());
PageSettings pgs = new PageSettings();
pgs.setPaperSize ( new PaperSize("A4", 827, 1169));
pgs.setMargins ( new Margins(0, 0, 0, 0));
viewer.printLargePdf(new FileInputStream("d:\\middleware.pdf"),pgs,ps);
viewer.closePdfFile();
This method has integrated the opening and the printing of the file and you need not calling the OpenPdfFile() explicitly.
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | The pdf stream to be opened and printed. |
pageSettings | PrintPageSettings | The page settings. |
printerSettings | PdfPrinterSettings | The printer settings. |
decodeAllPages()
public BufferedImage[] decodeAllPages()
Get pages of current pdf file.
Returns: java.awt.image.BufferedImage[] - return the array of Pdf page images.
decodePage(int pageNumber)
public BufferedImage decodePage(int pageNumber)
Decodes a page of one Pdf file.
Parameters:
Parameter | Type | Description |
---|---|---|
pageNumber | int | The page number of one Pdf file which must be between 1 and PageCount. |
Returns: java.awt.image.BufferedImage - return the Pdf page image.
printDocumentWithSettings(PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
public void printDocumentWithSettings(PrintPageSettings pageSettings, PdfPrinterSettings printerSettings)
Prints the Pdf document with settings. If the document size is not complatible to page size, pdf.kit will extend it to fit page size.
PdfViewer viewer = new PdfViewer();
viewer.openPdfFile("d:\\test.pdf");
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.setPrintPageDialog ( false);//do not produce the page number dialog when printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName ( prtdoc.getPrinterSettings.getPrinterName());
PageSettings pgs = new PageSettings();
pgs.setPaperSize ( new PaperSize("A4", 827, 1169));
pgs.setMargins ( new Margins(0, 0, 0, 0));
viewer.printDocumentWithSettings(pgs, ps);
viewer.closePdfFile();
Parameters:
Parameter | Type | Description |
---|---|---|
pageSettings | PrintPageSettings | The page setting of the printing document. |
printerSettings | PdfPrinterSettings | The printer setting of the printing document. |
printerSettings object is used to print the document. pageSettings.PrinterSettings object is ignored. |
printDocumentWithSettings(PdfPrinterSettings printerSettings)
public void printDocumentWithSettings(PdfPrinterSettings printerSettings)
Prints the Pdf document with printer settings. The output page size will fit the the document first page size.
PdfViewer viewer = new PdfViewer();
viewer.openPdfFile("d:\\test.pdf");
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.setPrintPageDialog ( false); //do not produce the page number dialog when printing
PrinterSettings ps = new PrinterSettings();
PrintDocument prtdoc = new PrintDocument();
ps.setPrinterName ( prtdoc.getPrinterSettings().PrinterName());
viewer.printDocumentWithSettings(ps);
viewer.closePdfFile();
Parameters:
Parameter | Type | Description |
---|---|---|
printerSettings | PdfPrinterSettings | The printer setting of the printing document. |
printDocument()
public void printDocument()
Prints the Pdf document using default printer.
PdfViewer viewer = new PdfViewer();
viewer.openPdfFile("d:\\test.pdf");
viewer.setAutoResize ( true); //print the file with adjusted size
viewer.setAutoRotate ( true); //print the file with adjusted rotation
viewer.setPrintPageDialog ( false); //do not produce the page number dialog when printing
viewer.printDocument(ps);
viewer.closePdfFile();
getDefaultPageSettings()
public PrintPageSettings getDefaultPageSettings()
Gets the default page settings.
Returns: PrintPageSettings - Page settings object.
getDefaultPrinterSettings()
public PdfPrinterSettings getDefaultPrinterSettings()
Gets the default printer settings.
Returns: PdfPrinterSettings - Page settings object.
openPdfFile(String filePath)
public void openPdfFile(String filePath)
Opens a Pdf file, but does not actually decode the pages of the Pdf file.
PdfViewer viewer = new PdfViewer();
viewer.openPdfFile("d:\\test.pdf");
viewer.closePdfFile();
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The path of Pdf file. |
openPdfFile(InputStream inputStream)
public void openPdfFile(InputStream inputStream)
Opens a Pdf file stream. But does not actually decode the pages of the Pdf file.
PdfViewer viewer = new PdfViewer();
viewer.openPdfFile(new FileInputStream("d:\\test.pdf")));
viewer.closePdfFile();
Parameters:
Parameter | Type | Description |
---|---|---|
inputStream | java.io.InputStream | The pdf stream to be opened. |
closePdfFile()
public void closePdfFile()
Closes the current Pdf file.
decodePageToImage(int pageNumber, ImageType imageFormat)
public BufferedImage decodePageToImage(int pageNumber, ImageType imageFormat)
Decodes page to BufferedImage
Parameters:
Parameter | Type | Description |
---|---|---|
pageNumber | int | int value |
imageFormat | ImageType | ImageType object |
Returns: java.awt.image.BufferedImage - BufferedImage value
getScaleFactor()
public float getScaleFactor()
Gets a floating point value that indicates scale factor. The default value is 1.0.
Returns: float - floating point value.
setScaleFactor(float value)
public void setScaleFactor(float value)
Sets a floating point value that indicates scale factor. The default value is 1.0.
Parameters:
Parameter | Type | Description |
---|---|---|
value | float | floating point value. |
bindPdf(String srcFile)
public void bindPdf(String srcFile)
Initializes the facade.
Parameters:
Parameter | Type | Description |
---|---|---|
srcFile | java.lang.String | The PDF file. |
bindPdf(InputStream srcStream)
public void bindPdf(InputStream srcStream)
Initializes the facade.
Parameters:
Parameter | Type | Description |
---|---|---|
srcStream | java.io.InputStream | The stream of PDF file. |
bindPdf(IDocument srcDoc)
public void bindPdf(IDocument srcDoc)
Initializes the facade.
Parameters:
Parameter | Type | Description |
---|---|---|
srcDoc | IDocument | The Document object. |
save(String destFile)
public void save(String destFile)
Saves the result PDF document to file.
Parameters:
Parameter | Type | Description |
---|---|---|
destFile | java.lang.String | The path of output PDF document. |
save(InputStream destStream)
public void save(InputStream destStream)
Saves the result PDF document to stream.
Parameters:
Parameter | Type | Description |
---|---|---|
destStream | java.io.InputStream | The stream of output PDF document. |
close()
public void close()
Closes the current Pdf file.
dispose()
public void dispose()
Disposes the facade resources.
This method is obsolete, use close() instead.