This is a migrated thread and some comments may be shown as answers.

PdfViewer in WPF multiple pages print fail.

2 Answers 86 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Mert
Top achievements
Rank 1
Mert asked on 20 Apr 2016, 07:17 PM

Hello,

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
02.{
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.    }
12.}

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 Answers, 1 is accepted

Sort by
0
Mert
Top achievements
Rank 1
answered on 22 Apr 2016, 05:31 AM
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.
0
Boby
Telerik team
answered on 22 Apr 2016, 07:07 AM
Hello,

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.

Regards,
Boby
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
PDFViewer
Asked by
Mert
Top achievements
Rank 1
Answers by
Mert
Top achievements
Rank 1
Boby
Telerik team
Share this question
or