I create a pdf by myself in one of my application (only external lib used is zlib for deflate streams)
I tried to follow the PDF references.
It's a simple PDF file with a few pages, some text & lines to underline (deflated or not same problem), and 3 fonts, a xref.
The PDF is showing perfectly in the Reader X 10.1.1 but when i try to close the window it always asks me :
"Do you want to save changes before closing".
All save options are disabled in the preferences of the reader.
Is there anything to do in the reader to avoid this ?
Is there anything to do in the PDF itself to avoid this ?
Or maybe the PDF is not completly correct ? Which is possible even if i tried to follow the specs in the official reference document, there are alot of chances that i may have done something wrong.
I first tried the version without the deflated stream (so everything uncompressed) against the online repair tool to check/analyse it @ https://www.pdf-tools.com/osa/repair.aspx
And it says no error found, but the reader still want to save it when closing so i still had no clue at this point.
Fortunately, i finally found what was wrong with my generated PDF.
In my xref table, each object reference was not end by a full EOL, i only did put a newline char.
Now i have "carriage return" "newline" which is the full EOL and the reader is happy and close the file silently.
As suspected i did not follow correctly the specs on xref table
Now i'll go and figure what i did wrong with the deflate filter
Thanks for your help.