Interface IPdfRenderer
Provides a mechanism for rendering PDF pages using third-party PDF renderers.
Namespace: Syncfusion.Windows.PdfViewer
Assembly: Syncfusion.SfPdfViewer.UWP.dll
Syntax
public interface IPdfRenderer
Properties
PageCount
Gets the total page count of the PDF document.
Declaration
int PageCount { get; }
Property Value
| Type |
|---|
| System.Int32 |
Methods
Close()
Closes the loaded PDF document
Declaration
void Close()
GetPageSize(Int32)
Gets the size of the PDF page corresponding to the given index.
Declaration
Size GetPageSize(int pageIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | pageIndex | Index of the page. This parameter follows zero-based indexing. |
Returns
| Type |
|---|
| System.Drawing.Size |
Initialize(Stream, String)
Initializes the third-party PDF renderer
Declaration
void Initialize(Stream pdfStream, string password)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | pdfStream | The stream read from the PDF document |
| System.String | password | The password of the PDF if it is encrypted. It will be null for unencrypted PDF documents |
RenderPageBitmap(Int32, Double, Double)
Renders the PDF page specified by the pageIndex and returns the rendered page as SoftwareBitmap
Declaration
SoftwareBitmap RenderPageBitmap(int pageIndex, double pageWidth, double pageHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | pageIndex | The index of the page to be rendered.This parameter follows zero-based indexing. |
| System.Double | pageWidth | The width of the page to be rendered |
| System.Double | pageHeight | The height of the page to be rendered |
Returns
| Type |
|---|
| Windows.Graphics.Imaging.SoftwareBitmap |