We are creating PDFs using Aspose.Pdf and it creates a 7mb pdf even with the compression settings changed from the default. When we put the pdf through adobe and compress it it come out at 500kb.I can send in the PDF if required.
Does Aspose.Pdf have any pdf compression utilities?
Thanks.
Rob.
Hi,
Thank you for considering Aspose.
Aspose.Pdf does not have any extra compression utility in the Api, but the property named as CompressionLevel which could be set at the time of creating PDF documents. As you are saying that you have set the compression level already. Please try it with value=9. This is the maximum compression level that Aspose.Pdf supports.
Thanks.
Adeel Ahmad
Support Developer
Aspose Changsha Team
Dear Rob,
If it still won't work please provide an example and let us check it. You'd better provide the code that can reproduce the error.
Tommy
Below is the code we use to compress the pdf
Dim objFileStream As New IO.FileStream("C:\tmp.pdf", FileMode.Open)
Dim pdfCompressor As New Pdf(objFileStream)
pdfCompressor.CompressionLevel = 9
pdfCompressor.Save("C:\tmp2.pdf")
Do you need the pdf we are trying to compress?
Thanks for your help.
Rob.
Hi Rob,
Sorry for not making you clear. First of all, we cann’t compress existing Pdf files using Aspose.Pdf. Secondly, I wonder how you can run the above code. This compression property is used when you are creating the Pdf file from scratch.
Should you have any other queries.Please feel free to ask.
Thanks.
Adeel Ahmad
Support Developer
Aspose Changsha Team