---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/PdfViewer
---

# PdfViewer

## Overview

`PdfViewer` is a class in Aspose.PDF FOSS for .NET.
Inherits from: `IFacade`, `System.IDisposable`.

FaÃ§ade for viewing / printing a PDF document.

This class provides 35 methods for working with PdfViewer objects in .NET programs.
Available methods include: `BindPdf`, `Close`, `ClosePdfFile`, `DecodeAllPages`, `DecodePage`, `Dispose`, `GetDefaultPageSettings`, `GetDefaultPrinterSettings`, `OpenPdfFile`, `PdfViewer`, `PrintDocument`, `PrintDocumentWithSettings`, and 4 additional methods.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `AutoResize`, `AutoRotate`, `AutoRotateMode`, `CoordinateType`, `FormPresentationMode`, `HorizontalAlignment`, and 13 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `AutoResize` | `bool` | Read/Write | Gets or sets the auto resize. |
| `AutoRotate` | `bool` | Read/Write | Gets or sets the auto rotate. |
| `AutoRotateMode` | `AutoRotateMode` | Read/Write | Gets or sets the auto rotate mode. |
| `CoordinateType` | `PageCoordinateType` | Read/Write | Gets or sets the coordinate type. |
| `FormPresentationMode` | `FormPresentationMode` | Read/Write | Gets or sets the form presentation mode. |
| `HorizontalAlignment` | `HorizontalAlignment` | Read/Write | Gets or sets the horizontal alignment. |
| `VerticalAlignment` | `VerticalAlignment` | Read/Write | Gets or sets the vertical alignment. |
| `PageCount` | `int` | Read | Number of pages in the bound document, or 0 when nothing is bound. |
| `Password` | `string` | Read/Write | Owner password used when opening encrypted documents via OpenPdfFile(string). |
| `PrintAsGrayscale` | `bool` | Read/Write | Gets or sets the print as grayscale. |
| `PrintAsImage` | `bool` | Read/Write | Gets or sets the print as image. |
| `PrintPageDialog` | `bool` | Read/Write | When true, PrintDocumentWithSetup would surface the OS print dialog. |
| `PrintStatus` | `object` | Read | Always returns null in this build; printing is not implemented. |
| `PrinterJobName` | `string` | Read/Write | Gets or sets the printer job name. |
| `RenderingOptions` | `Aspose.Pdf.RenderingOptions` | Read/Write | Gets or sets the rendering options. |
| `Resolution` | `int` | Read/Write | Target rasterisation DPI consulted by viewer-level rendering (the Decode methods throw, so this is currently configuration-only). |
| `ScaleFactor` | `float` | Read/Write | Gets or sets the scale factor. |
| `ShowHiddenAreas` | `bool` | Read/Write | Gets or sets the show hidden areas. |
| `UseIntermidiateImage` | `bool` | Read/Write | Gets or sets the use intermidiate image. |

## Methods

| Signature | Description |
|-----------|-------------|
| `PdfViewer()` | Calls PdfViewer on this PdfViewer instance. |
| `PdfViewer(document: Document)` | Calls PdfViewer(document) on this PdfViewer instance. |
| `BindPdf(srcDoc: Document)` | Loads a PDF from a file path into the viewer |
| `BindPdf(srcFile: string)` | Calls BindPdf(srcFile) on this PdfViewer instance. |
| `BindPdf(srcStream: Stream)` | Calls BindPdf(srcStream) on this PdfViewer instance. |
| `OpenPdfFile(filePath: string)` | Calls OpenPdfFile(filePath) on this PdfViewer instance. |
| `OpenPdfFile(inputStream: Stream)` | Calls OpenPdfFile(inputStream) on this PdfViewer instance. |
| `Close()` | Calls Close on this PdfViewer instance. |
| `ClosePdfFile()` | Calls ClosePdfFile on this PdfViewer instance. |
| `Dispose()` | Calls Dispose on this PdfViewer instance. |
| `Save(destFile: string)` | Calls Save(destFile) on this PdfViewer instance. |
| `Save(destStream: Stream)` | Calls Save(destStream) on this PdfViewer instance. |
| `DecodePage(pageNumber: int)` | Always throws: the viewer does not produce Bitmap objects; render via ImageDevice (SkiaSharp-backed) instead. |
| `DecodeAllPages()` | Always throws: see DecodePage(int). |
| `GetDefaultPageSettings()` | Returns a fresh, empty PageSettings. |
| `GetDefaultPrinterSettings()` | Returns a fresh, empty PrinterSettings. |
| `PrintDocument()` | Sends the currently bound PDF to the default printer |
| `PrintDocumentWithSettings(printerSettings: PrinterSettings)` | Calls PrintDocumentWithSettings(printerSettings) on this PdfViewer instance. |
| `PrintDocumentWithSettings(pageSettings: PageSettings, printerSettings: PrinterSettings)` | Calls PrintDocumentWithSettings(pageSettings, printerSettings) on this PdfViewer instance. |
| `PrintDocumentWithSetup()` | Calls PrintDocumentWithSetup on this PdfViewer instance. |
| `PrintDocuments(documents: Document[])` | Calls PrintDocuments(documents) on this PdfViewer instance. |
| `PrintDocuments(filePaths: string[])` | Calls PrintDocuments(filePaths) on this PdfViewer instance. |
| `PrintDocuments(documentStreams: Stream[])` | Calls PrintDocuments(documentStreams) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, documents: Document[])` | Calls PrintDocuments(printerSettings, documents) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, filePaths: string[])` | Calls PrintDocuments(printerSettings, filePaths) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, documentStreams: Stream[])` | Calls PrintDocuments(printerSettings, documentStreams) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, pageSettings: PageSettings, documents: Document[])` | Calls PrintDocuments(printerSettings, pageSettings, documents) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, pageSettings: PageSettings, filePaths: string[])` | Calls PrintDocuments(printerSettings, pageSettings, filePaths) on this PdfViewer instance. |
| `PrintDocuments(printerSettings: PrinterSettings, pageSettings: PageSettings, documentStreams: Stream[])` | Calls PrintDocuments(printerSettings, pageSettings, documentStreams) on this PdfViewer instance. |
| `PrintLargePdf(filePath: string)` | Calls PrintLargePdf(filePath) on this PdfViewer instance. |
| `PrintLargePdf(inputStream: Stream)` | Calls PrintLargePdf(inputStream) on this PdfViewer instance. |
| `PrintLargePdf(filePath: string, printerSettings: PrinterSettings)` | Calls PrintLargePdf(filePath, printerSettings) on this PdfViewer instance. |
| `PrintLargePdf(inputStream: Stream, printerSettings: PrinterSettings)` | Calls PrintLargePdf(inputStream, printerSettings) on this PdfViewer instance. |
| `PrintLargePdf(filePath: string, pageSettings: PageSettings, printerSettings: PrinterSettings)` | Calls PrintLargePdf(filePath, pageSettings, printerSettings) on this PdfViewer instance. |
| `PrintLargePdf(inputStream: Stream, pageSettings: PageSettings, printerSettings: PrinterSettings)` | Calls PrintLargePdf(inputStream, pageSettings, printerSettings) on this PdfViewer instance. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)