maui-devexpress-dot-maui-dot-pdf-dot-pdfviewer-737a98ed.md
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
public PdfDocumentSource DocumentSource { get; set; }
| Type | Description |
|---|---|
| PdfDocumentSource |
A PdfDocumentSource descendant.
|
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:
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
report.ExportToPdf(resultFile);
pdfViewer.DocumentSource = PdfDocumentSource.FromFile(resultFile);
loadingShimmer.IsLoading = false;
See Also