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?