PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Dec 04, 2021 4:01 am

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Read out lines in a PDF
PostPosted: Wed Jun 23, 2021 10:45 am 

Joined: Wed Jun 23, 2021 10:06 am
Posts: 1
Hey guys
I'm Frank and a developer from Germany.

I signed up in the forum because I have a very specific question, that I haven't found an answer to yet: I created my own barcode in a PDF, using C# and PDFSharp. Now I would like to evaluate this barcode again (in a second step).

Is there a possibility with PDFSharp to be able to evaluate drawn lines in a PDF?


I draw lines 5 pixels long (from top to bottom). these lines are 1 to 3 pixels thick and have an (empty) space of 1 to 2 pixels - then comes the next line.
I want to start at the first position and see how thick the first line and the first distance is, then the second and so on.
The result could look like this: 10102010010103

Is there already a tool in PDFSharp with which the project can be implemented? Or has nobody come up with such a crazy idea yet? :lol:
If such a tool does not (yet) exist: does anyone have an idea to solve this project by other tools?

Thank you and hopefully lots of ideas


Example image : https://ibb.co/74yMnNQ

Reply with quote  
PostPosted: Thu Jun 24, 2021 6:28 am 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 683
Location: CCAA
Welcome to the forum!

PDFsharp was not designed to extract text from PDF, but some folks use it for that purpose.

Extracting lines is like extracting text: You can use PDFsharp to get the page description, but then you have to parse it yourself and extract the drawing instructions you need.
This can be rather simple when the barcodes always come from the same application. This can be very difficult if the PDFs come from different applications.
To get started, I would search samples that use PDFsharp to extract text from PDF.

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

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

All times are UTC

Who is online

Users browsing this forum: No registered users and 17 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