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

Quick Print in PdfViewer

14 Answers 245 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
k
Top achievements
Rank 1
k asked on 17 Feb 2012, 03:59 PM

Do we have support for quick print in pdfviewer. Also can you provide a sample project using 2012 q1 Radpdfviewer as i am having issues to implement it.

It gives me KeynotFound error

14 Answers, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 22 Feb 2012, 02:52 PM

Hi,

We will check if there is an issue when the PdfViewer is used in an application run on Windows XP.

1. Silverlight does not support silent printing. The print dialog should be user initiated or the application will throw a SecurityException. More info about the printing in Silverlight you can find here.
2. Please find attached a project that is mostly the same as our online demo. You should be able to run it when you fix the references to the latest 2012.1.215 release (if needed).

Kind regards,
Kammen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Edward
Top achievements
Rank 2
answered on 02 Apr 2012, 06:49 PM
Hi,


I will soon be looking into this component. It looks very nice.


I do have a question regarding the pdfViewer and it looks similair to this one:


- Is it possible to silent print a document? We are running the application out of browser and in full trust.


Thanks in advance!


Sincerely,

Edward
0
Kammen
Telerik team
answered on 03 Apr 2012, 12:18 PM
Hi Edward,

Currently, it is not possible to print without the PrintDialog. However, we have scheduled such a feature in the WPF version of RadPdfViewer for the Q2 release. When we start implementing it, we will do a research to see if it is possible to print silently in SL 5 OOB application. If so, we will try to implement it in this use-case as well.

Kind regards,
Kammen
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Edward
Top achievements
Rank 2
answered on 04 Apr 2012, 08:30 AM
Great.  

Just for extra info: I can print silently via SL5 in full trust but only ascii.  It is only pdf (and doc etc. ) what is not working for me.

To give you  a clue how I did it :)



this code is used for windows applications:

http://support.microsoft.com/kb/322091/en-us


and change for silverlight the managed to unmanged like this

  public static bool SendManagedByteArrayToPrinter(string pPrinterName, byte[] pPrintByteArrayManaged, string pDocumentTitle)
        {
            bool result;
           
            var unmanagedHandle = GCHandle.Alloc(pPrintByteArrayManaged, GCHandleType.Pinned);

            try
            {

// !! must be translated to utf-8 first??

                var ptrUnmanaged = unmanagedHandle.AddrOfPinnedObject();
                result = SendBytesToPrinter(pPrinterName, ptrUnmanaged, pPrintByteArrayManaged.Length, pDocumentTitle);
            }
            finally
            {
                unmanagedHandle.Free();
            }


            return result;
        }
0
Kammen
Telerik team
answered on 06 Apr 2012, 12:43 PM
Hi Edward,

Thank you for the follow-up and the valuable insight. We will have this in mind when we start to implement the feature. 

Kind regards,
Kammen
the Telerik team

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

0
Edward
Top achievements
Rank 2
answered on 11 Jul 2012, 03:44 PM
Hi,

Is there already any progress on the matter ?

Thanks in advance.



0
Kammen
Telerik team
answered on 12 Jul 2012, 01:02 PM
Hello Edward,

We have scheduled this feature for the SP that will be released at the end of the month. If everything goes according to plan, it should be ready by then.

Greetings,
Kammen
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Edward
Top achievements
Rank 2
answered on 12 Jul 2012, 02:54 PM
Awesome..
0
Edward
Top achievements
Rank 2
answered on 29 Aug 2012, 03:43 PM
Hi

That works !!  Awesome. 



0
rho
Top achievements
Rank 1
answered on 08 Dec 2012, 09:38 AM
Can you supply a sample application? Thanks in advance.
0
Kammen
Telerik team
answered on 12 Dec 2012, 04:39 PM
Hello Reinhard,
Here is a sample code demonstrating how to print silently in Silverlight:
this.viewer.Print(new Telerik.Windows.Documents.Fixed.Print.PrintSettings("Document1", true));

All the best,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
rho
Top achievements
Rank 1
answered on 14 Dec 2012, 06:07 PM
Thanks. I will give it a try.
0
Michele
Top achievements
Rank 2
answered on 11 Mar 2013, 01:51 PM
Excuse me,
this will print OS native or via SL conversion?
0
Kammen
Telerik team
answered on 13 Mar 2013, 08:43 AM
Hi Paolo,

RadPdfViewer uses Silverlight printing.

All the best,
Kammen
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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