Skip navigation
Currently Being Moderated

Adobe Acrobat Reader want to modify my pdf when closing it. Why?

Jul 10, 2013 6:41 AM



I'm working on a small and simple pdf generator (as said in my previous question).

When opening my generated pdf with Adobe Acrobat Reader, all is OK.

But when I'm closing it, Adobe Reader popup a message asking  if I want to save the modifications.


Why Adobe Reader want to modifiy my pdf??

Is there something wrong with it?


Here is a realy tiny small sample of a one blank page generated pdf (all is pure ASCII because there is no compression, no data stream,... and it's a copy/paste from a text editor, so I've no translated typo into my message).

I think I've followed the specification; but perhaps I've missed something?



1 0 obj <</Type /Catalog /Pages 2 0 R>>


2 0 obj <</Type /Pages /Kids [4 0 R] /Count 1>>


3 0 obj


    /Producer (PdfLib)





4 0 obj <</Type /Page /Parent 2 0 R /MediaBox [0 0 595 841] /Resources <<>> /Contents 5 0 R>>


5 0 obj

<</Length 0>>





0 6

0000000000 65535 f

0000000009 00000 n

0000000056 00000 n

0000000111 00000 n

0000000240 00000 n

0000000341 00000 n

trailer <</Size 6 /Root 1 0 R /Info 3 0 R>>









  • Currently Being Moderated
    Jul 10, 2013 6:48 AM   in reply to FrontAlex

    That means that the PDF is broken/invalid and Reader had to fix it.


    PDF is NOT a text/ASCII format.  It is a strict structured binary format.   Treating it as ASCII is probably a root of the problem.

    Mark as:
  • Currently Being Moderated
    Jul 10, 2013 7:06 AM   in reply to FrontAlex

    Usually it's the xref table, but it could be other aspects.


    Why don't you save the PDF with Reader and figure out what's different afterwards?



    Mark as:
  • Currently Being Moderated
    Jul 10, 2013 7:14 AM   in reply to FrontAlex

    According to the PDF specification, cross reference table entries


    shall be exactly 20 bytes long, including the end-of-line marker


    Yours merely are 19 bytes long.

    Mark as:
  • Currently Being Moderated
    Jul 10, 2013 7:15 AM   in reply to FrontAlex

    It looks like your XREF entries are not 20 bytes long. Read the section

    about the XREF format again in the PDF spec to see how you need to format

    each entry.





    Karl Heinz Kremer

    PDF Acrobatics Without a Net

    PDF Software Development, Training and More...


    Mark as:
  • Currently Being Moderated
    Jul 10, 2013 7:43 AM   in reply to Karl Heinz Kremer

    Metadata is the info dictionary is fairly obsolete, you should be using the XML stream anyway... but that isn't why it is rebuilt.

    Mark as:
  • Currently Being Moderated
    Jul 11, 2013 12:36 AM   in reply to FrontAlex

    FrontAlex wrote:


    10 digit number + space + 5 digits number + n + \r\n


    I've just written \n not \r\n .

    You actually have a choice, the line ending does not need to be \r\n, the requirement is


    a 2-character end-of-line sequence consisting of one of the following: SP CR, SP LF, or CR LF

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points