Download the PDF version of this guide.
Before you start
Check your Visual Studio. Recommend release is:
Copy following folders from downloaded demo project to your own project root path:
Follow below steps:
Before you can use most APIs from Radaee Core Lib, you have to activate it with your license. To do so, call the following method before everything starts.
using com.radaee.reader;
......
RDPDFLib.pdf.PDFGlobal.ActiveLicense(2, "[Company_name]", "[Mail]", "[License]");
In any .xaml file which you want to display the PDF file content.
Prepare a RelativePanel as a PDF document content container.
<RelativePanel Name="[Your_Container_Name]" />
Select a PDF document file from your local drive by using FileOpenPicker
FileOpenPicker filePicker;
filePicker = new FileOpenPicker();
filePicker.ViewMode = PickerViewMode.List;
filePicker.SuggestedStartLocation = PickerLocationId.DocumentsLibrary;
filePicker.FileTypeFilter.Add(".PDF");
filePicker.FileTypeFilter.Add(".pdf");
StorageFile file = await filePicker.PickSingleFileAsync();
if (file != null){
// Application now has read/write access to the picked file
IRandomAccessStream stream = await
file.OpenAsync(FileAccessMode.ReadWrite);
if (stream != null)
{
pdf_open(stream, "");
}
}
Open PDF document file:
private void pdf_open(IRandomAccessStream stream, String password){
PDFDoc doc = new PDFDoc();
PDF_ERROR err = doc.Open(stream, password);
switch (err) {
case PDF_ERROR.err_open:
break;
case PDF_ERROR.err_invalid_para:
break;
case PDF_ERROR.err_encrypt:
break;
case PDF_ERROR.err_bad_file:
break;
case PDF_ERROR.err_password:
break;
case PDF_ERROR.err_ok:
show_PDF(stream, doc);
break;
default:
break;
}
}
Show PDF document content in container:
private void show_PDF(IRandomAccessStream stream, PDFDoc doc){
PDFReader reader = new PDFReader();
reader.PDFOpen(“[Your_Container_Name]”, doc,
PDF_LAYOUT_MODE.layout_vert, null);
}
RadaeePDF SDK for Windows 10
Created : 2021-04-13 18:18:09, Last Modified : 2021-04-13 18:19:26