load image pdf in pdfViewer

2 posts, 0 answers
  1. Nadeeka
    Nadeeka avatar
    1 posts
    Member since:
    Sep 2013

    Posted 24 Sep 2013 Link to this post

    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?
  2. Alexander
    Admin
    Alexander avatar
    41 posts

    Posted 26 Sep 2013 Link to this post

    Hello Nadeeka,

    Could you provide a sample document which is being opened as a blank page, so we can examine it? You can open a support ticket, as uploading PDF files in the forum is not permitted.

    Regards,
    Alexander
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top