A possible solution for this problem could be to change/expand the stm
public api in the following way:

- Rename the current pdf_stm_seek/tell functions to
  pdf_stm_bseek/btell. The 'b' is for 'backend'.

- Add a new function pdf_stm_tell that returns the number of octects
  since the last bseek (or since the creation of the stream if no
  bseek was made).

Since the operation in the streams is inherently sequential, that
schema makes sense in my opinion.

The addition of a new function to the tokeniser returning the offset
of the beginning of the last read token would then use this
pdf_stm_tell function.

What do you think? If you agree I will implement it as part of my
type4+tokeniser patch.

-- 
Jose E. Marchesi  <[email protected]>
                  http://www.jemarch.net
GNU Project       http://www.gnu.org


Reply via email to