[Lazarus] PDF generator: please test

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Mon Apr 11 10:38:44 CEST 2016


On 2016-04-11 02:17, Dmitry Boyarintsev wrote:
> I always assumed it represents text as a sequence of glyphs, rather than
> sequence of characters. But it seems like both options are possible.

No, your first assumption is correct. When it comes to PDF, there is NO
notion of text strings (sequence of characters). PDF only understands
graphical elements (lines, rectangles, curves etc). The PDF creator
breaks text down into character ID's (something like Unicode codepoints
- but again PDF's know nothing about Unicode either). Those character
ID's are used to look up Glyph ID's in the font file. The Glyph ID's are
what are stored inside the PDF. When viewed, those glyph ID's are used
to retrieve the vector graphic instructions from the font file to render
a glyph.

You might view a PDF with a text editor and see text strings. It might
look like text strings to you (eg: ASCII range), but PDF doesn't
consider them text, but rather ID's. It is pure coincidence that they
happen to look like text in a text editor.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp




More information about the Lazarus mailing list