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

NameTypeAccessDescription
autoResizebooleanReadReturns whether pages are auto-resized to fit the paper.
autoRotatebooleanReadReturns whether pages are auto-rotated to best fit.
printPageDialogbooleanReadReturns whether a print dialog is shown before printing.
printAsGrayscalebooleanReadReturns whether to print in grayscale.
resolutionintReadReturns the rendering resolution in DPI.
useIntermidiateImagebooleanReadReturns whether intermediate image is used.

méthodes

SignatureDescription
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)BufferedImageRenders a single page to a BufferedImage.
decodeAllPages()BufferedImage[]Renders all pages to BufferedImage array.
print(g: Graphics, pf: PageFormat, pageIndex: int)int
isAutoResize()booleanReturns whether pages are auto-resized to fit the paper.
setAutoResize(v: boolean)Sets whether pages are auto-resized to fit the paper.
isAutoRotate()booleanReturns whether pages are auto-rotated to best fit.
setAutoRotate(v: boolean)Sets whether pages are auto-rotated.
isPrintPageDialog()booleanReturns whether a print dialog is shown before printing.
setPrintPageDialog(v: boolean)Sets whether a print dialog is shown.
isPrintAsGrayscale()booleanReturns whether to print in grayscale.
setPrintAsGrayscale(v: boolean)Sets whether to print in grayscale.
getResolution()intReturns 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()booleanReturns whether intermediate image is used.
closePdfFile()Closes the PDF file (alias for close).
close()

Voir aussi

  • Aspose.PDF pour Java — API d’entreprise
 Français