title: Does the %%EOF in a PDF have to appear within the last 1024 bytes of the file?
body: <p>According to the <a href="http://qpdf.sourceforge.net/" rel="noreferrer">QPDF</a> source I was reading it had this quote about pdfs:</p>
  
  <pre><code>// PDF spec says %%EOF must be found within the last 1024 bytes of
  // the file.  We add an extra 30 characters to leave room for the
  // startxref stuff.
  </code></pre>
  
  <p>However, I cannot find any information regarding this in the PDF 1.7 specification. I found a couple places on the internet that also mentioned this though.</p>
  
  <p>My question is: <strong>is this true and if so, where is this specified that <code>%%EOF</code> will be in the last 1024 bytes?</strong></p>