Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
monsters [2021/07/24 07:53]
christian [Incorrect stream length]
monsters [2021/07/24 08:12] (current)
christian [Incorrect stream length]
Line 77: Line 77:
  
 If there are more bytes extra, a ''ReadError'' is raised and no stream object is created. The error may be proceeded, but if the stream is used later, another error will occur. If there are more bytes extra, a ''ReadError'' is raised and no stream object is created. The error may be proceeded, but if the stream is used later, another error will occur.
 +
 +== Known problem ==
 +
 +The general problem has not been adressed. One idea is to find the end of the stream content of the current object. With this information it is possible to determine if the ''/Length'' entry is too small or too big and what to do about it.
 +
 +The end of the stream would be before the ''endobj'' and ''endstream'' tokens before the start of the next object. The cross reference table has the offsets of all objects in consecutive order. Thus, the next object after the current is given by the next reference in the table. If the current object is the last object in the PDF, the end of the object is before the ''xref'' token starting the cross reference table.
 +
 +Object streams need not be considered, because they cannot contain streams.
 +
 +This should be easy for the simple case of only one xref table. But handling several xrefs from different updates deemed too complex at the time (that's why I write this here as a reminder for the next time I need to deal with this problem).
  
 === Reference === === Reference ===
  
 Seen in ''/Info/Producer'': ''Bluebeam PDF Library 18'' Seen in ''/Info/Producer'': ''Bluebeam PDF Library 18''
  • monsters.1627105981.txt.gz
  • Last modified: 2021/07/24 07:53
  • by christian