PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:33 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Read Geo-Referenced PDF
PostPosted: Wed Dec 30, 2020 6:57 pm 
Offline

Joined: Wed Dec 30, 2020 6:50 pm
Posts: 2
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]


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 04, 2021 9:55 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
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.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 05, 2021 1:02 am 
Offline

Joined: Wed Dec 30, 2020 6:50 pm
Posts: 2
Yes, that should be the points, but how do I extract them from the PDF? Does PDFSharp support that?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 128 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group