You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CreatePDFAndView/README.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ This folder contains a sample project that demonstrates how to create a PDF docu
12
12
13
13
# Steps
14
14
## 1. Create PDF
15
-
Create the PDF using the PDF library and save the PDF using a memory stream. Create the below method in the PdfViewerViewModel class.
15
+
In this example, we will load the PDF document through MVVM binding. Create a new C# file named PdfViewerViewModel.cs. Create the PDF using the PDF library and save the PDF as a stream. Create the following method in the PdfViewerViewModel class.
16
+
Create the PDF using the PDF library and save the PDF as stream. Create the below method in the PdfViewerViewModel class.
16
17
17
18
```csharp
18
19
privateMemoryStreamCreatePDF()
@@ -41,14 +42,15 @@ Create the PDF using the PDF library and save the PDF using a memory stream. Cre
41
42
}
42
43
```
43
44
## 2. To load PDF in the PDF Viewer
44
-
Initialize the PDF Viewer control in the .NET MAUI application and load the PDF stream to the PDF Viewer.
45
+
Initialize the PDF Viewer control in the .NET MAUI application and load the PDF stream into the PDF Viewer by binding the PDF Viewer's `DocumentSource` to the PdfDocumentStream property of the PdfViewerViewModel class.
0 commit comments