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

Giant Pdf

1 Answer 17 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Marcello
Top achievements
Rank 1
Marcello asked on 10 Jul 2015, 09:12 AM

Hi,

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

 Why?

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

Thank's marc.

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 10 Jul 2015, 02:05 PM
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);


Regards,
Boby
Telerik
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
Tags
RichTextBox
Asked by
Marcello
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or