We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Lowering PDF size or PDF quality on converstion

Thread ID:

Created:

Updated:

Platform:

Replies:

123702 Apr 12,2016 05:05 PM UTC Apr 13,2016 11:32 AM UTC WPF 1
loading
Tags: PDF
Derrick Ejan
Asked On April 12, 2016 05:05 PM UTC

Hello I am wondering if there is a way to lower the PDF size or quality for all docs converted to PDF.  I am converting a great amount of documents that I am printing and I am trying to optimize the time it takes to print out maybe hundreds of pdf files which I have converted using your tool.

Thank you

Derrick

Chinnu Muniyappan [Syncfusion]
Replied On April 13, 2016 11:32 AM UTC

Hi Derrick,

Thank you for contacting Syncfusion support.

Please find the below steps to reduce the PDF file size.
Doc to PDF converter supports to reduce the image quality of the converted PDF file, so you can reduce the converted PDF file size, Please refer the below code snippet for more details.

     //word document

  WordDocument wordDocument = new WordDocument("../../DoctoPDF.doc");


  //Create new instance for the doc to pdf converter

  DocToPDFConverter converter = new DocToPDFConverter();


  //Set the image quality

  converter.Settings.ImageQuality = 10;



You can set the PDF document compression level to it is best to reduce the file size. Please refer the below code snippet.

         //Convert the word document to PDF

            PdfDocument doc = converter.ConvertToPDF(wordDocument);


         //Set the PDF compression

         doc.Compression = PdfCompressionLevel.Best;


         //Save the document

         doc.Save("output.pdf");




And also we have created a simple sample for your reference, please refer the below sample for more details.
http://www.syncfusion.com/downloads/support/forum/123702/ze/WPFSample-2053799360.zip

Please let us know if you have any concern.

Regards,
Chinnu

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;