PdfViewer Class
Represents a class to view or print a pdf.
Inheritance Hierarchy
SystemObject
  Aspose.Pdf.FacadesPdfViewer

Namespace: Aspose.Pdf.Facades
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 19.12
Syntax
public sealed class PdfViewer : IFacade, 
	IDisposable

The PdfViewer type exposes the following members.

Constructors
  NameDescription
Public methodPdfViewer
Initializes new PdfViewer object.
Public methodPdfViewer(Document)
Initializes new PdfViewer object.
Properties
  NameDescription
Public propertyAutoResize
Gets or sets a bool value that indicates whether the file be printed with optimized size.

Field Value

Type: 
If false print page without page scaling. If true print page with scaling to fit to printable area.
Public propertyAutoRotate
Gets or sets a bool value that indicates whether the file be printed with auto rotation
Public propertyAutoRotateMode
Gets or sets a AutoRotateMode value that indicates direction of rotation
Public propertyCoordinateType
Gets or sets the page coordinate type (Media/Crop boxes). CropBox value is used by default.
Public propertyFormPresentationMode
Gets or sets form presentation mode.
Public propertyHorizontalAlignment
Gets or sets a value that indicates horizontal alignment
Public propertyPageCount
Gets page count of the current Pdf file.
Public propertyPassword
Gets or sets input document password.
Public propertyPrintAsGrayscale
Gets or sets a bool value that indicates whether the page is being printed as grayscale. By default is false.
Public propertyPrintAsImage
Sets or gets a mode for PdfViewer to print as image.
Public propertyPrinterJobName
Gets or sets name of document in printer queue when document is printed. Default value is file name.
Public propertyPrintPageDialog
Gets or sets a bool value that indicates whether produce the page number dialog when printing.
Public propertyPrintStatus
Gets the result of printing job. If success than null; otherwise, exception object.
Public propertyRenderingOptions
Gets or sets rendering options.
Public propertyResolution
Gets or sets resolution during viewing and printing. The higher resolution, the slower speed. The default value is 150.
Public propertyScaleFactor
Gets or sets a floating point value that indicates scale factor. The default value is 1.0.
Public propertyShowHiddenAreas Obsolete.
Gets or sets flag that controls visibility of hidden areas on the page.
Public propertyUseIntermidiateImage
Gets/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.
Public propertyVerticalAlignment
Gets or sets a value that indicates vertical alignment
Methods
  NameDescription
Public methodBindPdf(Stream)
Initializes the facade.
Public methodBindPdf(String)
Initializes the facade.
Public methodBindPdf(Document)
Initializes the facade.
Public methodClose
Closes the facade.
Public methodClosePdfFile Obsolete.
Closes the current Pdf file.
Public methodDecodeAllPages
Get pages of current pdf file.
Public methodDecodePage
Decodes a page of one Pdf file.
Public methodDispose
Disposes the facade resources.
Public methodEquals (Inherited from Object.)
Public methodGetDefaultPageSettings
Gets the default page settings.
Public methodGetDefaultPrinterSettings
Gets the default printer settings.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodCode exampleOpenPdfFile(Stream) Obsolete.
Opens a Pdf file stream. But does not actually decode the pages of the Pdf file.
Public methodCode exampleOpenPdfFile(String) Obsolete.
Opens a Pdf file, but does not actually decode the pages of the Pdf file.
Public methodCode examplePrintDocument
Prints the Pdf document using default printer.
Public methodCode examplePrintDocumentWithSettings(PrinterSettings)
Prints the Pdf document with printer settings. The output page size will fit the the document first page size.
Public methodCode examplePrintDocumentWithSettings(PageSettings, 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.
Public methodCode examplePrintDocumentWithSetup
Prints the Pdf document with a setup dialog. Choose a printer using the dialog.
Public methodCode examplePrintLargePdf(Stream)
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.
Public methodCode examplePrintLargePdf(String)
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.
Public methodCode examplePrintLargePdf(Stream, 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.
Public methodCode examplePrintLargePdf(String, 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.
Public methodCode examplePrintLargePdf(Stream, PageSettings, 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.
Public methodCode examplePrintLargePdf(String, PageSettings, 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.
Public methodSave(Stream)
Saves the result PDF document to stream.
Public methodSave(String)
Saves the result PDF document to file.
Public methodToString (Inherited from Object.)
Events
  NameDescription
Public eventEndPrint
Adds/removes subscription on the last page printing event.
Public eventPdfQueryPageSettings
Adds/removes subscription on the last page printing event.
See Also