We are having trouble generating small file with embedded image annotations.
On CloseDocument, we burn annotation to pages.
We test both VectorMode possibilities, and while VectorMode=true give good result in term of file size, the quality of the annotation is very poor.
with VectorMode=false, the quality is good, but the file size is ugly.
For example, an input of 22 pages files containing B&W MRC. Initial file size : 2.2MB.
Adding a colored stamp on each page : final size : 23.5MB without vector, 2.5MB with vector.
The initial stamp is a png of 5KB, but is composed as a Bitmap before being added.
Now, we are going deeper, using PDFXplorer to see the exact content of the output file.
When using vectorMode=false, it look like the whole page is rasterized as a single resource. Of course, the B&W MRC become an RGB with the colored stamp, which is huge.
While using vectorMode=true the initial resources are mostly untouched, and the annot is a new independent resource.
Question is :
- is it possible to improve the quality of the EmbeddedImageAnnot when burned as a vector ? (preferred solution)
- or is it possible to NOT Rasterize the page when an EmbeddedImageAnnot is burned without vector ?
Bonus question :
Is it possible to share an annotation between multiple page, to prevent duplication of the picture resource ?
Please find the input and output here :
https://drive.google.com/open?id=0B76C2 ... HhhYlJDMkk
Is this issue being reviewed ?
You can control the quality and compression scheme of each embedded images of a PDF using the GdPicturePDF class.
So in you case I suggest you to:
- load the PDF document using the GdPicturePDF class
- choose your favorite image compression mode / quality. IE: http://guides.gdpicture.com/content/web ... ality.html
- load the GdPicturePDF object into an AnnotationManager object.
- burn the annotations.
Please let me know if you need further information.
With best regards,
It's the first thing I do when I open the initial pdf.
I just tried with the latest gdpicture 14, and I reproduce the issue.
Change the BurnAnnotationsToPage call, to set vectorMode parameter to false
Load the source file
Add embedded image annotation and select the input stamp provided, then burn the annotation.
Repeat on some pages.
The file size did grow significantly, regardless of the compression mode.
You'll also see that when clicking the "burn" button, the stamp quality is greatly improve, regarding the same operation without the vectorMode parameter.
Who is online
Users browsing this forum: No registered users and 1 guest