Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

get the georeferenced coordinates of a position in PDF

Community Beginner ,
Jul 11, 2023 Jul 11, 2023

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.

TOPICS
How to , JavaScript , PDF
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 12, 2023 Jul 12, 2023

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. 

 

  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 13, 2023 Jul 13, 2023

Could you tell me how to make such a plugin or a phyton library to be able to do what you indicate?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2023 Jul 14, 2023
LATEST

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. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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