Giant Pdf

2 posts, 0 answers
  1. Marcello
    Marcello avatar
    78 posts
    Member since:
    Apr 2013

    Posted 10 Jul 2015 Link to this post


     when I export a document as pdf I obtain always a giant file.

    So I executed this simple test, I loaded a xaml 214Kb doc file, I save it as Pdf and I obtain a 4257Kb file!!


    Working with real files that contains 100/200 images I obtain files over 1 Gb.  

    Thank's marc.

  2. Boby
    Boby avatar
    703 posts

    Posted 10 Jul 2015 Link to this post

    Hello Marcello,

    This is caused by the fact that images are exported without compression. We plan to export the images with DCTDecode, which will decrease the size of the images drastically. The feature is currently scheduled for 2015 Q3, expected in October. You can vote for it and track the development progress at the public portal here:

    RadRichTextBox: Export images to PDF with DCTDecode.

    Possible workaround with the current version would be to change some of the export properties:

    PdfFormatProvider provider = new PdfFormatProvider();
    PdfExportSettings exportSettings = new PdfExportSettings();
    exportSettings.ContentsCompressionMode = PdfContentsCompressionMode.Automatic;
    exportSettings.ContentsDeflaterCompressionLevel = 9;
    exportSettings.FloatingUIContainersExportMode = PdfInlineUIContainersExportMode.Image;
    exportSettings.ImagesCompressionMode = PdfImagesCompressionMode.Automatic;
    exportSettings.ImagesDeflaterCompressionLevel = 9;
    provider.ExportSettings = exportSettings;
    provider.Export(radRichTextBox.Document, stream);

    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
Back to Top