Copy link to clipboard
Copied
Hi, I would like to know if it is possible to get the georeferenced coordinates of a given position in PDF. I have a georeferenced map from which, using the "Geospatial Location" tool, I can have the georeferenced coordinates of that point, but I would like to know if it is possible using python or javascript to extract said coordinates by giving a point from the pdf.
I attach an example plan and an image where the georeferenced coordinates appear.
Copy link to clipboard
Copied
The answer is a qualified NO. Geo-referencing is a late add-on to PDF and there is no Acrobat JavaScript interface to this data. It could be done with a custom plug-in, which could make the data available thru the Acrobat JavaScript model.
But since you mentioned Python, I'm thinking you mean extracting this data with a web based application. The answer to that is yes. The geo reference data is stored in a special structure inside the PDF. All you need is a PDF library that can extract this special data, and the PDF page coordinate data. Then you can write the code that converts page coordinates into Geo Coordinates. It's possible that something like this already exists, but it is outside the scope of this forum.
Copy link to clipboard
Copied
Could you tell me how to make such a plugin or a phyton library to be able to do what you indicate?
Copy link to clipboard
Copied
Here's a link to the documentation on creating Acrobt plug-ins
https://opensource.adobe.com/dc-acrobat-sdk-docs/library/plugin/index.html
Creating a python app requires a PDF library in Python. This is something you would need to license.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now