PdfViewer
Vue de l’ensemble
‘PdfViewer’ est une classe dans Aspose.PDF FOSS pour Java.Déduit de: ‘Imprimable’, ‘AutoCloseable’.
Facade pour la visualisation et l’impression de documents PDF.
Cette classe fournit 26 méthodes pour travailler avec des objets PdfViewer dans les programmes Java. Les méthodologies disponibles comprennent: Pdfviever, bindPDF , ‘close;closPdFile; decodeAllPages : decodePage: getResolution . isAutoResize. isAutroRotate., isPrintAsGrayscale,, isprintPAGEDialoget 11 méthode supplémentaires. Tous les membres publics sont accessibles à toute application Java après l'installation de l’ASPOSE.PDF FOSS pour le package Java . Propriétés :autoResise ! autoRoteprint Ascalagrays, ‘dialog‘print‘smuseimpression
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
autoResize | boolean | Read | Returns whether pages are auto-resized to fit the paper. |
autoRotate | boolean | Read | Returns whether pages are auto-rotated to best fit. |
printPageDialog | boolean | Read | Returns whether a print dialog is shown before printing. |
printAsGrayscale | boolean | Read | Returns whether to print in grayscale. |
resolution | int | Read | Returns the rendering resolution in DPI. |
useIntermidiateImage | boolean | Read | Returns whether intermediate image is used. |
méthodes
| Signature | Description |
|---|---|
PdfViewer() | Creates a new PdfViewer instance. |
bindPdf(inputFile: String) | Binds a PDF file to this viewer. |
bindPdf(stream: InputStream) | Binds a PDF from an input stream. |
bindPdf(doc: Document) | Binds an existing Document to this viewer. |
openPdfFile(inputFile: String) | Opens a PDF file (alias for bindPdf). |
printDocumentWithSettings(pageSettings: PrintPageSettings, printerSettings: PdfPrinterSettings) | Prints the document with specified page and printer settings. |
printDocumentWithSettings(printerSettings: PdfPrinterSettings) | Prints the document with the specified printer settings using default page settings. |
printDocument() | Prints the document using default settings. |
printLargePdf(inputFile: String) | Prints a large PDF file (binds and prints). |
decodePage(pageNum: int) → BufferedImage | Renders a single page to a BufferedImage. |
decodeAllPages() → BufferedImage[] | Renders all pages to BufferedImage array. |
print(g: Graphics, pf: PageFormat, pageIndex: int) → int | |
isAutoResize() → boolean | Returns whether pages are auto-resized to fit the paper. |
setAutoResize(v: boolean) | Sets whether pages are auto-resized to fit the paper. |
isAutoRotate() → boolean | Returns whether pages are auto-rotated to best fit. |
setAutoRotate(v: boolean) | Sets whether pages are auto-rotated. |
isPrintPageDialog() → boolean | Returns whether a print dialog is shown before printing. |
setPrintPageDialog(v: boolean) | Sets whether a print dialog is shown. |
isPrintAsGrayscale() → boolean | Returns whether to print in grayscale. |
setPrintAsGrayscale(v: boolean) | Sets whether to print in grayscale. |
getResolution() → int | Returns the rendering resolution in DPI. |
setResolution(v: int) | Sets the rendering resolution in DPI. |
setUseIntermidiateImage(v: boolean) | Sets whether to use an intermediate image for printing. |
isUseIntermidiateImage() → boolean | Returns whether intermediate image is used. |
closePdfFile() | Closes the PDF file (alias for close). |
close() |
Voir aussi
- Aspose.PDF pour Java — API d’entreprise