PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Read Geo-Referenced PDF
https://forum.pdfsharp.net/viewtopic.php?f=2&t=4217
Page 1 of 1

Author:  phunction [ Wed Dec 30, 2020 6:57 pm ]
Post subject:  Read Geo-Referenced PDF

I am trying to extract the point data from a geo referenced PDF in C#. Will PDFSharp work? For example a PDF map exported for ESRI ArcMap. I can see some information in the PDF like this:

<</Type/PROJCS/WKT(PROJCS["NAD_1983_BC_Environment_Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",1000000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-126.0],
PARAMETER["Standard_Parallel_1",50.0],PARAMETER["Standard_Parallel_2",58.5],PARAMETER["Latitude_Of_Origin",45.0],UNIT["Meter",1.0]])>>endobj
56 0 obj <</Type/Measure/Subtype/GEO/Bounds[0 1 0 0 1 0 1 1 ]/GPTS[50.63467 -120.10634 50.63738 -120.10599 50.63716 -120.10192 50.63446 -120.10227 ]/LPTS[0 1 0 0 1 0 1 1 ]/GCS 55 0 R>> endobj

While I could probably get the above info parsing it myself, but I don't see any Point information for the Easting/Northing(long/lat) of the points so I have no idea how they are stored in the document and hope I can use PDFSharp to extract the info.

[Edit: added line breaks in above snippent]

Author:  TH-Soft [ Mon Jan 04, 2021 9:55 am ]
Post subject:  Re: Read Geo-Referenced PDF

phunction wrote:
[...] but I don't see any Point information for the Easting/Northing(long/lat) of the points [...]
This should be one of the points: "50.63467 -120.10634"
50° north, 120° east.

Author:  phunction [ Tue Jan 05, 2021 1:02 am ]
Post subject:  Re: Read Geo-Referenced PDF

Yes, that should be the points, but how do I extract them from the PDF? Does PDFSharp support that?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/