Annotationsize

Discussions about annotation support.
Post Reply
Manson87
Posts: 1
Joined: Wed Jun 24, 2020 2:05 pm

Annotationsize

Post by Manson87 » Wed Jun 24, 2020 2:17 pm

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

User avatar
Fabio
Posts: 173
Joined: Thu Aug 27, 2020 9:57 am

Re: Annotationsize

Post by Fabio » Thu Aug 27, 2020 4:52 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest