You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
I'm using ILPDFKit to extract some text from some PDF files generated by another iOS app. Now I'm having some issues with the encoding of the text in certain files. I convert the Contents stream of an ILPDFPage into a string, then look for BT / ET pairs to extract the text.
For instance, one file contains the following text stream:
I'm using ILPDFKit to extract some text from some PDF files generated by another iOS app. Now I'm having some issues with the encoding of the text in certain files. I convert the
Contents
stream of an ILPDFPage into a string, then look for BT / ET pairs to extract the text.For instance, one file contains the following text stream:
BT 0.03260000 Tc 7 0 0 7 0 0 Tm /Tc1 1 Tf [ (Las) 4 (t Name) ] TJ ET
from which I can easily extract the string
Last Name
In another file (which has the same general format of the previous file, and which renders correctly on screen), I see the following string instead:
BT 0.03260000 Tc 7 0 0 7 0 0 Tm /TT2 1 Tf [ (!\"#) 4 ($%&\"\'\\() ] TJ ET
Why do I see those weird characters instead of the text
Last Name
? What am I doing wrong?The only difference between the two files, apparently, is that one was created on iOS 9, the other was created on iOS 10.
The text was updated successfully, but these errors were encountered: