Class OpenAndExportFileViewModel
This example demonstrates how to open and export a PDF.
Inheritance
System.Object
OpenAndExportFileViewModel
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Catalog.dll
Syntax
public class OpenAndExportFileViewModel : Observable, INotifyPropertyChanged
Properties
AutoSaveComboSelection
Declaration
public int AutoSaveComboSelection { get; set; }
Property Value
| Type |
Description |
| System.Int32 |
|
ExportNewPDFCommand
Declaration
public ICommand ExportNewPDFCommand { get; }
Property Value
| Type |
Description |
| System.Windows.Input.ICommand |
|
FlattenAnnotations
Declaration
public bool FlattenAnnotations { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
IncrementalSave
Declaration
public bool IncrementalSave { get; set; }
Property Value
| Type |
Description |
| System.Boolean |
|
OpenPDFCommand
Declaration
public ICommand OpenPDFCommand { get; }
Property Value
| Type |
Description |
| System.Windows.Input.ICommand |
|
OpenURICommand
Declaration
public ICommand OpenURICommand { get; }
Property Value
| Type |
Description |
| System.Windows.Input.ICommand |
|
PDFView
Declaration
public PdfView PDFView { get; }
Property Value
ResetPDFCommand
Declaration
public ICommand ResetPDFCommand { get; }
Property Value
| Type |
Description |
| System.Windows.Input.ICommand |
|
SavePDFCommand
Declaration
public ICommand SavePDFCommand { get; }
Property Value
| Type |
Description |
| System.Windows.Input.ICommand |
|
Methods
ExportNewPDF()
Export to a new file picked by the user.
If annotations are flattened they will be not be flattened in the currently open document.
Declaration
public async void ExportNewPDF()
Initialize(PdfView)
Declaration
public void Initialize(PdfView pdfView)
Parameters
| Type |
Name |
Description |
| PdfView |
pdfView |
|
OnPrint(Page)
Print the PDF opened by the user.
A more detailed implementation can be found in PSPDFKit.PrintPage.
That implementation includes an example for printing without opening a PdfView.
Declaration
public async void OnPrint(Page owningPage)
Parameters
| Type |
Name |
Description |
| Windows.UI.Xaml.Controls.Page |
owningPage |
|
OpenPDFPicker()
Declaration
public async void OpenPDFPicker()
OpenURIPicker()
Declaration
public async void OpenURIPicker()
ResetPDF()
Declaration
public async void ResetPDF()
SavePDF()
Save to the same file that was opened.
If annotations are flattened they will be flattened in the open document too.
Declaration
public async void SavePDF()
Implements
System.ComponentModel.INotifyPropertyChanged