Back to Devexpress

PdfViewer.DocumentSource Property

maui-devexpress-dot-maui-dot-pdf-dot-pdfviewer-737a98ed.md

latest2.4 KB
Original Source

PdfViewer.DocumentSource Property

Gets or sets the PDF document source (a string path, URI, or stream).

Namespace : DevExpress.Maui.Pdf

Assembly : DevExpress.Maui.Pdf.dll

NuGet Package : DevExpress.Maui.Pdf

Declaration

csharp
public PdfDocumentSource DocumentSource { get; set; }

Property Value

TypeDescription
PdfDocumentSource

A PdfDocumentSource descendant.

|

Remarks

Initialize the DocumentSource property with a UriPdfDocumentSource or StreamPdfDocumentSource object to load a PDF file by its URI or from a stream.

You can also call the following methods to load a PDF file from different sources:

csharp
pdfViewer.DocumentSource = PdfDocumentSource.FromFile("ReportMerging.pdf");

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DocumentSource property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

maui-generate-data-bound-report/CS/MauiReportingApp/MainPage.xaml.cs#L28

csharp
report.ExportToPdf(resultFile);
pdfViewer.DocumentSource = PdfDocumentSource.FromFile(resultFile);
loadingShimmer.IsLoading = false;

See Also

PdfViewer Class

PdfViewer Members

DevExpress.Maui.Pdf Namespace