Because the PdfDocument class is only available in Windows 8.1, there is something to use in a Windows phone 8.1 (windows runtime) for render a pdf file inside my app?
Edit
MuPdf Works great! But to make it work in a Windows Phone project i had to manually edit the .csproj
i had to add this code :
<Reference Include="MuPDFWinRT, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL" Condition="'$(Platform)'=='x86'">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\MuPDF\x86\MuPDFWinRT.winmd</HintPath>
</Reference>
<Reference Include="MuPDFWinRT, Version=255.255.255.255, Culture=neutral, processorArchitecture=MSIL" Condition="'$(Platform)'=='ARM' ">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\MuPDF\ARM\MuPDFWinRT.winmd</HintPath>
</Reference>
and this is a usage example:
IBuffer readBuffer = pdf.AsBuffer();
var pdfDocument = Document.Create(readBuffer, DocumentType.PDF, (int)Windows.Graphics.Display.DisplayInformation.GetForCurrentView().LogicalDpi);
List<WriteableBitmap> imageList = new List<WriteableBitmap>();
for (int i = 0; i < pdfDocument.PageCount; i++)
{
var size = pdfDocument.GetPageSize(i);
var width = size.X;
var height = size.Y;
var image = new WriteableBitmap(width, height);
IBuffer buf = new Buffer(image.PixelBuffer.Capacity);
buf.Length = image.PixelBuffer.Length;
pdfDocument.DrawPage(i, buf, 0, 0, width, height, false);
using (var stream = buf.AsStream())
{
await stream.CopyToAsync(image.PixelBuffer.AsStream());
}
imageList.Add(image);
}