var temp = await StaticData.issueFolder.GetFilesAsync();
using (PDFDraw draw = new PDFDraw())
{
PDFDoc doc;
draw.SetDPI(48);
foreach (var page in PDFPageList)
{
string fileName = page.file;
fileName = fileName.Substring(fileName.LastIndexOf('/') + 1);
var tempFile = await StaticData.issueFolder.GetFileAsync(fileName);
IRandomAccessStream stream = await tempFile.OpenAsync(FileAccessMode.Read);
doc = new PDFDoc(stream);
if (!doc.InitStdSecurityHandler(StaticData.password))
{
//StatusTextBlock.Text = "Incorrect Password: " + StaticData.password;
}
// C) Rasterize the first page in the document and save the result as PNG.
var pg = doc.GetPage(1);
//draw.Export(pg, StaticData.issueFolder.Path + "\\" + fileName.Split('.')[0] + ".png");
//TODO: fix the bug here
WriteableBitmap wb = await draw.GetBitmapAsync(pg);
}
}