What compression options are available when saving PDFs

Last post 02-03-2012, 10:26 AM by awais.hafeez. 4 replies.
Sort Posts: Previous Next
  •  05-05-2011, 1:25 AM 301423

    What compression options are available when saving PDFs .NET

    Hi,

       Currently I am using Aspose.Words for .Net version 9.5.0.0 in my application. I want to know below details.

    1. Is it possible to apply any of the compression type while converting word documnet to PDF using Aspose.Words.dll in C#.Net application.

    2. What are all the compression options are available when saving Word document to PDF.

    3. How to apply compression type while converting Word document to PDF.

    I need above details for

    • Excel document to PDF conversion using Aspose.Cells.dll for .Net version 5.2.2.1 in C# application and
    • PowerPoint document to PDF conversion using Aspose.Slides.dll for .Net version 5.0.1.0 in C# application as well.

    Thanks,

    Dhivya

     

     
  •  05-05-2011, 2:29 AM 301445 in reply to 301423

    Re: What compression options are available when saving PDFs

    Hi

     

    Thanks for your inquiry. I think, there is no difference, which method of compression you use. 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. Subseting 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)

     

    Please see the following code:

     

    // Open source document.

    Document doc = new Document("C:\\Temp\\in.docx");

     

    // Set PdfSaveOptions

    PdfSaveOptions opt = new PdfSaveOptions();

    opt.SaveFormat = SaveFormat.Pdf;

    opt.TextCompression = PdfTextCompression.Flate;

    opt.JpegQuality = 60;

     

    doc.Save("C:\\Temp\\out.pdf", opt);

     

    Regarding Aspose.Cells and Aspose.Slides, could you please write to the appropriate forums and my colleagues will answer you shortly.

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  05-05-2011, 4:05 AM 301479 in reply to 301445

    Re: What compression options are available when saving PDFs

    Thank you AndreyN.

     
  •  02-03-2012, 8:47 AM 359185 in reply to 301479

    Re: What compression options are available when saving PDFs

    I don't see the compression level option when I create an object of class PdfSaveOptions. The ony property I see is the SaveOptions and that does not have the compression level on it. I need to have a way of compressing the PDF file I'm saving with Aspose.PDF because it's highly uncompressed.

    What we're doing is to concatenate separate PDFs coming from a reporting tool but the final file is not very efficiently compressed. A 9 MB file created by Aspose can be compressed to 1.5 Mb by Acrobat Pro. Is there a way to improve the compression level in Aspose?
     
  •  02-03-2012, 10:26 AM 359225 in reply to 359185

    Re: What compression options are available when saving PDFs

    Hi David,

    Thanks for your inquiry. Aspose.Words offers PdfSaveOptions class that can be used to specify additional options when saving a document into the Pdf format. Also, we have recently updated the documentation; please check for TextCompression property in class members list.

    If we can help you with anything else, please feel free to ask.

    Best Regards,

    Awais Hafeez
    Support Developer
    Aspose Sialkot Team
    Aspose - Your File Format Experts

    Keep in touch! We're on Twitter and Facebook
     
View as RSS news feed in XML