Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've scoured my back collection of PDF files and come up with 2 which contain PS XObjects (this really <em>is</em> deprecated). I can't, unfortunately, share tehm as they are customer data files :-(</p> <p>However, here is an extract from one of them:</p> <pre><code>74 0 obj &lt;&lt; /Type /XObject /Subtype /PS /Filter /FlateDecode /Length 77 0 R /Name /Ps1 &gt;&gt; stream ....endstream </code></pre> <p>Note 1, there is no EOL between the end of data and the 'endstream' token.</p> <pre><code>77 0 obj 4480 endobj </code></pre> <p>The offset of the 0x0A following the 'stream' token is 0xdab15, the offset of the 'e' in endstream is 0xdbc96. That is 4481 bytes. SO it looks to me like the /Length should contain all the bytes <em>after</em> the EOL for the 'stream' token' right up to the last byte before the 'e' in the endstream token.</p> <p>I think it would be OK to insert a 0x0A after the stream data and before the endstream. That would come down to a whitespace after the stream data before the token, and PDF is supposed to be tolerant of whitespace.</p> <p>This is consistent with the description of the /Length entry for stream dictionaries in Table 3.4 (p62 of the 1.7 PDF reference):</p> <blockquote> <p>The number of bytes from the beginning of the line fol-lowing the keyword stream to the last byte just before the keyword endstream. (There may be an additional EOL marker, preceding endstream, that is not included in the count and is not logically part of the stream data.) See “Stream Extent,” above, for further discussion.</p> </blockquote> <p>I think (if I've counted correctly) that the /Length in your example should be 87, assuming one byte line terminators in the PostScript fragment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload