I work as a support engineer and get some customer files where the second entry is missing in text rendition of the PDF file. When I replace it with the entry as shown below, the PDF file behaves as it should with our product. This is what is missing sometimes - %âãÏÓ
If I save the file, then open the PDF file up again in Adobe Pro and save it, the PDF file works as expected. We have some files from a customer that are created by Microsoft Reporting Services 10.0.0.0.
My question is what is that second line of binary code for? Also, if it is not there, what is the significance?
It's actually not doing anything: The '%' at the beginning of the line marks anything following this '%' as a comment, so any PDF processor will skip over this line. The reason it's there is to force any application that tries to sense if the file contains binary data into binary mode. Some of these applications that try to sense if a file is plain text or binary only look at the first few hundreds (or tens) of characters, so by having non-ASCII text in the second line, such an application will switch to binary mode. This was important when you transferred files via communication channels that default to text mode, which would then potentially corrupt binary data in a PDF file.
You are referring to "our product", I don't know what that product is and how it is processing PDF files, but it should not depend on that line being there.
Thank you. The product I am referring to scrubs PDF files for various metadata. If that entry is not there, the scrubbed PDF file is blank or no text. From your post, the cause of the blank file could be as you note, the binary data may become corrupt.