PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 16, 2024 5:19 am

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
PostPosted: Wed Dec 28, 2016 3:15 pm 
Offline

Joined: Wed Dec 28, 2016 2:39 pm
Posts: 2
hi! :)

PdfSharp is a very cool library but I have a problem about extracting texts. PDF reference explain this : "Strings may also be written in hexadecimal form".
I get some hexadecimal form after extracting texts but these datas are differents of original text.

For exemple :
My PDF contains "Ajout d’une langue à un projet." and when i extract texts with PdfSharp, i get this : "00040169017D01B5019A0003011A035B01B50176011E0003016F01020176015001B5011E00030103000301B5017600030189018C017D0169011E019A0358".
I can't find the original text. Indeed when I convert this to ASCII, it gives me "i}µš[µvovPµµv‰Œ}išX" which is totaly different compared the original text..


Does anyone have any clue what is the issue and how to fix it?

Thanks beforehand for your reply!


Top
 Profile  
Reply with quote  
PostPosted: Wed Dec 28, 2016 4:13 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 913
Location: CCAA
Hi!

PDF files often contain a subset of Unicode fonts and there should be a mapping table that allows you to translate the indexes from the hex string to the Unicode values.
Can you copy the text to the clipboard using Adobe Reader?

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


Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 29, 2016 3:40 pm 
Offline

Joined: Wed Dec 28, 2016 2:39 pm
Posts: 2
Yes I can copy the text to the clipboard using Adobe Reader.

I finaly found the mapping table! I just have to use it to convert the hexa form.

Thanks for your answer, it helped me :D


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: Google [Bot] and 78 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