We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Compress document while saving from word to PDF

Hi ,
Im Aspose Word in .NET . I want to compress a word file while saving as pdf . What all can be done to achieve maximum compression .
I’m currently using this

Aspose.Words.Saving.PdfSaveOptions options = new Aspose.Words.Saving.PdfSaveOptions();
options.TextCompression = Aspose.Words.Saving.PdfTextCompression.Flate;
options.ImageCompression = Aspose.Words.Saving.PdfImageCompression.Auto;
docfile.Save(ms, Aspose.Words.SaveFormat.Pdf);

Are there other ways to reduce file size further ?


Following code example shows how to reduce the output PDF file size. There are also some other PDF save options that can help you for getting a smaller PDF file. Hope this helps you.

  • PdfSaveOptions.TextCompression
  • PdfSaveOptions.FontEmbeddingMode
  • PdfSaveOptions.MetafileRenderingOptions
  • PdfSaveOptions.ImageCompression
  • PdfSaveOptions.JpegQuality
  • PdfSaveOptions.DownsampleOptions
Document doc = new Document(MyDir + "input.docx");
PdfSaveOptions options = new PdfSaveOptions();
options.ImageCompression = PdfImageCompression.Jpeg;
options.JpegQuality = 80;

doc.Save(MyDir + "21.9.pdf", options);