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

Print pdf coommand freesez the gui

3 Answers 22 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 29 Jun 2012, 08:57 AM
Hello,
I'm loading a pdf from stream and when I click the print command if freezes the gui for 10/15 seconds before the silverlight print menu shows up... what can I check to fix it?
Thanks

3 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 02 Jul 2012, 06:35 AM
Hi Paolo,

The GUI freezes because the document starts to load the pages content. You may preload the content using the ReadAllAtOnce setting, so when the Print method is called, it will show the print menu immediately. More information about the loading modes can be found here.  

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Michele
Top achievements
Rank 2
answered on 02 Jul 2012, 06:40 AM
Hello Kammen,
I'm just using it...

if (b.Error == null)
                {
                    MemoryStream ms = new MemoryStream(b.RenderingResult.DocumentBytes);
 
                    pdfViewer.ReportMemoryStream = ms;
 
                    PdfFormatProvider provider = new PdfFormatProvider(ms, Telerik.Windows.Documents.Fixed.FormatProviders.FormatProviderSettings.ReadAllAtOnce);
                    this.pdfViewer.Document = provider.Import();
                }
0
Kammen
Telerik team
answered on 04 Jul 2012, 11:11 AM
Hi Paolo,

Can you send us the document that you are using in order to reproduce this issue? We have tried different documents, but the Print dialog showed instantly. In fact, even when the document is not loaded entirely, the freezing should happen after the print button in the print dialog is pressed, not before. 

Kind regards,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
PDFViewer
Asked by
Michele
Top achievements
Rank 2
Answers by
Kammen
Telerik team
Michele
Top achievements
Rank 2
Share this question
or