Page 1 of 1

Annotationsize

Posted: Wed Jun 24, 2020 2:17 pm
by Manson87
Hi,

i'm having a problem because of the size of annotations (AddEmbeddedImageAnnot).
The problem is, that i don't now how to set/calculate the correct size.

If its a tif-document i can calculate the size to inches, for example if the picture is 16px width and the TIF-document has a a resolution of 300 DPI, the size would be 0,05333 inches. (Pixels / DPI = Inches)

When i have a pdf-document, i can't calculate the size, because a pdf-document doesnt have a resolution, how can i get the correct size, so the annotations look the same way as in the tif-document?

Best regards

daniel

Re: Annotationsize

Posted: Thu Aug 27, 2020 4:52 pm
by Fabio
Hello,

If your document is image-based, you can use the method RenderPageToGdPictureImageEx: https://www.gdpicture.com/guides/gdpicture/GdP ... ageEx.html

By using this method, you will be able to transform your PDF page to an image using the object GdPictureImage.
The produced image is in the 32-bit ARGB pixel format, and you will be able to calculate the size.

Hope it helps!

Regards,
Fabio de Rose
Solution Engineer