New Forum | Previous | Next | (P-PDF) Developers
Topic: how are you using text objects and path objects
Conf: (P-PDF) Developers, Msg: 53693
Date: 5/29/2002 05:00 PM
PDF includes operators to divide path objects from text objects (BT, ET). The spec states, "The important point is that there is no semantic significance to the exact arrangement of graphics state operators."
So, is there an informal consensus about how people are using BT and ET?
For those of us generating PDF, there are choices. Do I put one BT, draw all of the text, put an ET, and then paint all of the paths? Or do I put use BT ET for each logical section of text even though marked text is really how to do this? Or can I use BT and ET repeatedly to wildly intersperse a little bit of text with a few lines?
Those who are consuming PDF, please comment on what effect the approaches in the paragraph above will have. Does adding many BT and ET operators slow things down badly? Or does adding too few BT and ET operators cause problems as you try to cache everything starting at BT until you get to ET, and too much in one shot will overload the cache? Despite the spec steering us toward marked content, are there PDF consumers that make assumptions about the logical structure based on the patterns of BT and ET?
Here is the situation that a hypothetical developer of a PDF generator faces (although in my case, it is not so hypothetical): When fed a stream of text and line drawing commands that are to be translated into PDF, should I make a BT/ET sandwich each time I see a text object? Or should I somehow accumulate the text and the lines into two separate caches and then stream the two caches into PDF in large text and path blocks? Both approaches will work, although the former approach is easier to implement than the latter. Will there be any difference on the PDF consumption side?
Now that Acrobat 5 does not allow a path operator inside a text object, it is time for many of us to decide how to interleave the text and path objects. I appreciate any comments from the PDF consumers.