Class PdfViewer
Contents
[
Hide
]PdfViewer class
Represents a class to view or print a pdf.
public sealed class PdfViewer : IFacade
Constructors
Name | Description |
---|---|
PdfViewer() | Initializes new PdfViewer object. |
PdfViewer(Document) | Initializes new PdfViewer object. |
Properties
Name | Description |
---|---|
AutoResize { get; set; } | Gets or sets a bool value that indicates whether the file be printed with optimized size. If false print page without page scaling. If true print page with scaling to fit to printable area. |
AutoRotate { get; set; } | Gets or sets a bool value that indicates whether the file be printed with auto rotation |
AutoRotateMode { get; set; } | Gets or sets a AutoRotateMode value that indicates direction of rotation |
CoordinateType { get; set; } | Gets or sets the page coordinate type (Media/Crop boxes). CropBox value is used by default. |
FormPresentationMode { get; set; } | Gets or sets form presentation mode. |
HorizontalAlignment { get; set; } | Gets or sets a value that indicates horizontal alignment |
PageCount { get; } | Gets page count of the current Pdf file. |
Password { get; set; } | Gets or sets input document password. |
PrintAsGrayscale { get; set; } | Gets or sets a bool value that indicates whether the page is being printed as grayscale. By default is false. |
PrintAsImage { get; set; } | Sets or gets a mode for PdfViewer to print as image. |
PrinterJobName { get; set; } | Gets or sets name of document in printer queue when document is printed. Default value is file name. |
PrintPageDialog { get; set; } | Gets or sets a bool value that indicates whether produce the page number dialog when printing. |
PrintStatus { get; } | Gets the result of printing job. If success than null; otherwise, exception object. |
RenderingOptions { get; set; } | Gets or sets rendering options. |
Resolution { get; set; } | Gets or sets resolution during viewing and printing. The higher resolution, the slower speed. The default value is 150. |
ScaleFactor { get; set; } | Gets or sets a floating point value that indicates scale factor. The default value is 1.0. |
UseIntermidiateImage { get; set; } | 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. |
VerticalAlignment { get; set; } | Gets or sets a value that indicates vertical alignment |
Methods
Name | Description |
---|---|
BindPdf(Document) | Initializes the facade. |
BindPdf(Stream) | Initializes the facade. |
BindPdf(string) | Initializes the facade. |
Close() | Closes the facade. |
DecodeAllPages() | Get pages of current pdf file. |
DecodePage(int) | Decodes a page of one Pdf file. |
Dispose() | Disposes the facade resources. |
GetDefaultPageSettings() | Gets the default page settings. |
GetDefaultPrinterSettings() | Gets the default printer settings. |
PrintDocument() | Prints the Pdf document using default printer. |
PrintDocumentWithSettings(PrinterSettings) | Prints the Pdf document with printer settings. The output page size will fit the the document first page size. |
PrintDocumentWithSettings(PageSettings, PrinterSettings) | Prints the Pdf document with settings. If the document size does not correspond to page size, it will be extended to fit page size. |
PrintDocumentWithSetup() | Prints the Pdf document with a setup dialog. Choose a printer using the dialog. |
PrintLargePdf(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. |
PrintLargePdf(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. |
PrintLargePdf(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. |
PrintLargePdf(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. |
PrintLargePdf(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. |
PrintLargePdf(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. |
Save(Stream) | Saves the result PDF document to stream. |
Save(string) | Saves the result PDF document to file. |
Events
Name | Description |
---|---|
event CustomPrint | Occurs before printing starts and allows to provide custom print handlers instead of the default one. |
event EndPrint | Adds/removes subscription on the last page printing event. |
event PdfQueryPageSettings | Adds/removes subscription on the last page printing event. |
See Also
- interface IFacade
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF