Back to Devexpress

PdfDocumentSource.FromFile(String) Method

maui-devexpress-dot-maui-dot-pdf-dot-pdfdocumentsource-dot-fromfile-x28-system-dot-string-x29.md

latest1.8 KB
Original Source

PdfDocumentSource.FromFile(String) Method

Loads a PDF file by its path.

Namespace : DevExpress.Maui.Pdf

Assembly : DevExpress.Maui.Pdf.dll

NuGet Package : DevExpress.Maui.Pdf

Declaration

csharp
public static PdfDocumentSource FromFile(
    string path
)

Parameters

NameTypeDescription
pathString

A PDF file’s path.

|

Returns

TypeDescription
PdfDocumentSource

A source object that contains a PDF file.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FromFile(String) method.

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

PdfDocumentSource Class

PdfDocumentSource Members

DevExpress.Maui.Pdf Namespace