How to reduce pdf size?

Hi, I save from word to pdf using the code below:-

doc.Save("myreport.pdf", SaveFormat.Pdf);

My word template is 85 kb in size;

But after mail merge and save to pdf;

the size of the pdf becomes 216kb.

Can I reduce the pdf file size?


Thanks for your request. Size of PDF documents can be reduced only by doing the following:

  1. Decreasing size of images inside PDF (this can be done only be decreasing quality).
  2. Subsetting fonts, which are embedded into the PDF documents. (Aspose.Words does this by default).
  3. Compression of text (Usually decreasing of size is not very big)
  4. Using “Core fonts”. “Core fonts” are 14 fonts, which are supported by PDF viewers by default. We can optionally get rid embedding of these fonts into PDF. But, unfortunately, this feature is not supported by Aspose.Words at the moment. I will let you know once it is available.

Difference in side of PDF document generated by Aspose.Words and MS Word can be explained by different way of subsetting fonts. For example, if you try to convert a larger document to PDF the size different will be unnoticeable.
As a variant, you can try using TextCompression and JpegQuality options. But you should note if you change JpegQuality you can reduce the quality of images in the document. See the following code:

// Open source document.
Document doc = new Document("in.doc");
// Set PdfSaveOptions
PdfSaveOptions pdfOptions = new PdfSaveOptions();
pdfOptions.TextCompression = PdfTextCompression.Flate;
pdfOptions.JpegQuality = 60;
doc.Save("out.pdf", pdfOptions);

Hope this helps.
Best regards,

Hi, I do not see the PdfSaveOptions.

Note that I only have Aspose.Words.

Can you give me example using Aspose.Words?


Thanks for your request. It seems you are using an old version of Aspose.Words. The latest version of Aspose.Words is 10.1.0; you can download this version from here:
Best regards,

No, I have already using the latest version 10.10.

Can you give me the long form of PdfOptions?

Aspose.Words. ??


PdfOptions was replaced with PdfSaveOptions few releases ago. Just replacing files in the bin folder is not enough, you should remove old reference from you project and add new reference to new dll.
Best regards,

I always delete and add new reference;

since you guys always have new version; haha.

Anyway, I tried again; and I saw the method under



Will generate and see if there is saving in the file size.

The issues you have found earlier (filed as WORDSNET-2716) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.