Quick Print in PdfViewer

15 posts, 0 answers
  1. k
    k avatar
    1 posts
    Member since:
    Aug 2010

    Posted 17 Feb 2012 Link to this post


    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
  2. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 22 Feb 2012 Link to this post

    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 >>
  3. DevCraft banner
  4. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 02 Apr 2012 Link to this post

    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
  5. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 03 Apr 2012 Link to this post

    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 >>
  6. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 04 Apr 2012 Link to this post

    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;
            }
  7. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 06 Apr 2012 Link to this post

    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 >>

  8. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 11 Jul 2012 Link to this post

    Hi,

    Is there already any progress on the matter ?

    Thanks in advance.



  9. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 12 Jul 2012 Link to this post

    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 >>
  10. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 12 Jul 2012 Link to this post

    Awesome..
  11. Edward
    Edward avatar
    45 posts
    Member since:
    Aug 2005

    Posted 29 Aug 2012 Link to this post

    Hi

    That works !!  Awesome. 



  12. rho
    rho avatar
    9 posts
    Member since:
    Feb 2006

    Posted 08 Dec 2012 Link to this post

    Can you supply a sample application? Thanks in advance.
  13. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 12 Dec 2012 Link to this post

    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.

  14. rho
    rho avatar
    9 posts
    Member since:
    Feb 2006

    Posted 14 Dec 2012 Link to this post

    Thanks. I will give it a try.
  15. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 11 Mar 2013 Link to this post

    Excuse me,
    this will print OS native or via SL conversion?
  16. Kammen
    Admin
    Kammen avatar
    312 posts

    Posted 13 Mar 2013 Link to this post

    Hi Paolo,

    RadPdfViewer uses Silverlight printing.

    All the best,
    Kammen
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner