RadPdfViewer.Print on Windows 10 - PDF goes to "Spooling" and disappears.

4 posts, 0 answers
  1. AmitThk
    AmitThk avatar
    1 posts
    Member since:
    Nov 2014

    Posted 31 Aug 2015 Link to this post


     We are facing this strange issue with PDFViewer.Print functionality on Windows 10 only.

    Attached is the sample using latest Telerik dlls (Telerik_UI_for_WPF_2015_2_728_Dev.msi).  The problem is - once we print - it goes into the Printing queue and shows "Spooling" but does not print - rather disappears after some time. Please advise.


    class Program
        /// <summary>
        /// Main method.
        /// </summary>
        /// <param name="args">The args.</param>
        static void Main(string[] args)
            string fileName = "CMI9063.pdf";
            if ((args != null) && (args.Length > 0))
                fileName = args[0];
            // Load the PDF file.
            byte[] buffer = LoadPdfFile(fileName) ?? new byte[] { };
            using (MemoryStream stream = new MemoryStream(buffer))
                PrintDialog printDialog = new PrintDialog { UserPageRangeEnabled = true };
                if (printDialog.ShowDialog() == true)
                    RadPdfViewer radPdfViewer = new RadPdfViewer { DefaultFormatProviderSettings = FormatProviderSettings.ReadOnDemand };
                    radPdfViewer.Document = new PdfFormatProvider(stream, FormatProviderSettings.ReadOnDemand).Import();
                    radPdfViewer.Print(printDialog, PrintSettings.Default);
                    //System.Windows.MessageBox.Show("Successfully print to \"" + printDialog.PrintQueue.FullName + "\"", "Print", System.Windows.MessageBoxButton.OK, System.Windows.MessageBoxImage.Information);
        private static byte[] LoadPdfFile(string filePath)
            byte[] buffer;
            string folder = Directory.GetCurrentDirectory();
            if (!filePath.StartsWith(folder))
                filePath = Path.Combine(folder, filePath);
            //load from physical path
            if (File.Exists(filePath))
                using (FileStream fs = new FileStream(filePath, FileMode.Open))
                    buffer = new byte[fs.Length];
                    fs.Read(buffer, 0, buffer.Length);
                return null;
            return buffer;
  2. Nikolay Demirev
    Nikolay Demirev avatar
    103 posts

    Posted 03 Sep 2015 Link to this post

    Hi Amit,

    There really is an issue related with the printing in Windows 10. I have been able to reproduce it. I have logged an item in our Feedback portal where you can track the progress on the matter.

    I have updated your Telerik Points as a token of our appreciation for reporting the bug.

    Nikolay Demirev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Réjean
    Réjean avatar
    1 posts
    Member since:
    Jan 2014

    Posted 19 Oct Link to this post


    Is the above code snippet supposed to work when using R2 2016 SP1 DLLs?

    I only get blank pages when printing (on Windows 7 and Windows 10).



  5. Deyan
    Deyan avatar
    129 posts

    Posted 3 days and 13 hours ago Link to this post

    Hello Réjean,

    According to the comments in the feedback item the fix is included in 2016 Q1 SP1. When testing on our side with R2 2016 SP1, the documents seems to be printed correctly. We have previously seen WPF printing problems related to printer drivers. A possible solution is to try printing with latest version of the printer drivers and latest version of RadPdfViewer. 

    If you still face the same issue after the software upgrade, please write again with a more detailed description of your machine setup so that we may try reproducing it on our side.

    I hope this helps.

    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top