Search code examples
pdffontsquartz-2dcgpdfdocument

Why PDF text showing operators don't show white space?


I'm parsing a PDF with Apple's Quartz framework. The text showing operators I put (Tj, TJ, ', ") don't show space for some fonts. Have you any idea why this occurs ? My thought is just because the PDF file is made that way. But here comes another question : how can application like preview detect spaces in that PDF file ?


Solution

  • Many times there is no such thing as a "space" in a piece of text inside a PDF, and sometimes not even words. You may just have font glyphs that are placed at specific positions.