PdfViewer in WPF multiple pages print fail.

3 posts, 0 answers
  1. Mert
    Mert avatar
    2 posts
    Member since:
    Aug 2015

    Posted 20 Apr Link to this post


    I'm facing a strange behaviour. PdfViewer prints nothing. Prints only when page is selected as 1 in Print Dialog, if i try the same thing with selecting page 2 (or giving a range) it does nothing. I am binding DocumentSource of pdfviewer to a property  on my viewmodel which returns PdfDocumentSource. Pdf is rendered normally.

    01.public Telerik.Windows.Documents.Fixed.PdfDocumentSource PdfReport
    03.    get
    04.    {
    05.        Telerik.Windows.Documents.Fixed.PdfDocumentSource docSource;
    06.        var array = Reporting.Pdf.PdfReportHelper.GetReport(); //Dynamically creates the pdf
    07.        var output = new MemoryStream(array);
    08.        docSource = new Telerik.Windows.Documents.Fixed.PdfDocumentSource(output);
    09.        docSource.Loaded += (sender, args) => { if (output != null) output.Dispose();};
    10.        return docSource;
    11.    }

    There is a similar thread like this about winforms wihch suggests to set ReadingMode to 0. I found a reading mode property in formatProviderSettings class but it didn't do the trick. Am i doing something wrong?

  2. Mert
    Mert avatar
    2 posts
    Member since:
    Aug 2015

    Posted 22 Apr in reply to Mert Link to this post

    I was using 2015.1.401.45. I downloaded latest trial version (2016.1.217.45) and it works fine. I couldn't see any fix records about this on release history, but as it seems there was a problem and now it's fixed with the new release.
  3. DevCraft R3 2016 release webinar banner
  4. Boby
    Boby avatar
    588 posts

    Posted 22 Apr Link to this post


    I just checked the release notes since 2015 Q1, and haven't found anything that seems related to such problem. If you send the us the problematic document, we may be able to find which change exactly fixed the behavior. It would help if you describe specific steps on how to reproduce the problem.

    We can continue our conversation in the support thread you opened, where you should be able to attach files privately.

    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top