HI All,
I need to display pdf files in silverlight user control. currently I am using PdfViewer and can open some pdf files. but some pdf files are not displayed correctly (Image PDF) , but viewed as a blank page. following is my code.
private void fnLoadPDF(string file)
{
Uri url = new Uri("/" + file + "", UriKind.RelativeOrAbsolute);
WebClient wc = new WebClient();
wc.OpenReadAsync(url);
wc.OpenReadCompleted += (s, args) =>
{
if (args.Error == null)
{
PdfFormatProvider fp = new PdfFormatProvider(args.Result, FormatProviderSettings.ReadAllAtOnce);
this.pdfViewer.Document = fp.Import();
}
};
}
can someone kindly address this issue?
I need to display pdf files in silverlight user control. currently I am using PdfViewer and can open some pdf files. but some pdf files are not displayed correctly (Image PDF) , but viewed as a blank page. following is my code.
private void fnLoadPDF(string file)
{
Uri url = new Uri("/" + file + "", UriKind.RelativeOrAbsolute);
WebClient wc = new WebClient();
wc.OpenReadAsync(url);
wc.OpenReadCompleted += (s, args) =>
{
if (args.Error == null)
{
PdfFormatProvider fp = new PdfFormatProvider(args.Result, FormatProviderSettings.ReadAllAtOnce);
this.pdfViewer.Document = fp.Import();
}
};
}
can someone kindly address this issue?