ABCPDF Alter image compression when carrying out doc.AddImageUrl
Using ABCPDF, currently generating pdf'开发者_运维百科s with 1mb files. When we alter the pdf in acrobat pro, and simply change the image quality this drops the size to 100K.
I have looked at the documentation for ABCPDF however I cannot find a simple example of dropping the image quality prior to saving the document, hence getting a smaller pdf.
Appears simple :
doc.HtmlOptions.ImageQuality = 33;
Without reviewing the code you used to create the PDF, I would strongly suggest taking a second look at it ensure you are using the Flatten
method for your document.
http://www.websupergoo.com/helppdf7net/default.html
The AbcPdf library adds objects to a page with each typically represented as an individual layer. When you execute the Flatten
method all layers on the document will be removed and replaced by compressed respresentation.
Example c# code snippet:
for (int i = 1; i <= yourPdfDocument.PageCount; i++) {
yourPdfDocument.PageNumber = i;
yourPdfDocument.Flatten();
}
精彩评论