JPG pixel coordinates to PDF coordinates converter?

New Here ,
Feb 04, 2019

Copy link to clipboard

Copied

Hello,

Does anyone have a tool or know of the pixel conversions for a JPG image point to PDF document location?

Regards,

William Johnston

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Images are images, regardless of the file format they are all an array of pixels. The PDF  coordinate spaces are all measured at 72points/inch.  So if you know the image location, width, and height in PDF coordinates, then it's a straight forward conversion to find the location of a pixel.

For example, to get the horizontal coordinate:

xPDF = xImageCoord + xPixel * ImageWidthPDF/ImageWidthPixels

Of course, how this is done depends on the context. What are you trying to do?

TOPICS
Acrobat SDK and JavaScript

Views

1.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

JPG pixel coordinates to PDF coordinates converter?

New Here ,
Feb 04, 2019

Copy link to clipboard

Copied

Hello,

Does anyone have a tool or know of the pixel conversions for a JPG image point to PDF document location?

Regards,

William Johnston

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

Images are images, regardless of the file format they are all an array of pixels. The PDF  coordinate spaces are all measured at 72points/inch.  So if you know the image location, width, and height in PDF coordinates, then it's a straight forward conversion to find the location of a pixel.

For example, to get the horizontal coordinate:

xPDF = xImageCoord + xPixel * ImageWidthPDF/ImageWidthPixels

Of course, how this is done depends on the context. What are you trying to do?

TOPICS
Acrobat SDK and JavaScript

Views

1.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 04, 2019 0
Adobe Community Professional ,
Feb 04, 2019

Copy link to clipboard

Copied

Images are images, regardless of the file format they are all an array of pixels. The PDF  coordinate spaces are all measured at 72points/inch.  So if you know the image location, width, and height in PDF coordinates, then it's a straight forward conversion to find the location of a pixel.

For example, to get the horizontal coordinate:

xPDF = xImageCoord + xPixel * ImageWidthPDF/ImageWidthPixels

Of course, how this is done depends on the context. What are you trying to do?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 04, 2019 1
New Here ,
Feb 06, 2019

Copy link to clipboard

Copied

Hello,

I would like to insert highlighted text from JPG images from Microsoft Azure Computer Vision OCR API.

Thanks for letting me know on the dpi for PDF.

I may need to create a formula.

Thank you.

Sincerely,

William Johnston

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 06, 2019 0