Copy link to clipboard
Copied
SQL Server Reporting Services 2019 report exported to PDF and able to open in all browsers, but unable to open acrobat reader. It’s working fine in SSRS 2016.
While open the PDF in acrobat reader getting this message “There was an error open this document .The file is damaged could not be repaired
Copy link to clipboard
Copied
No solution to this issue as of Feb 2021?
Copy link to clipboard
Copied
When no sample file is supplied such that we can analyze what's going on, it is impossible for anyone to determine whether the issue is a problematic PDF file or a problem in the software. If @Jay5C5A would be willing to provide a sample, we could try to assist.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks. I can duplicate the problem but regrettably, it doesn't open enough to be able to run Acrobat's built-in diagnostic tools. It does open in both our mobile reader (iOS and Android) and the Adobe web viewer.
I'm sending this off to others in engineering to analyze.
Copy link to clipboard
Copied
BTW, is the failure to open the PDF file in desktop Adobe Reader (i.e., Windows or MacOS) or on the mobile versions (iOS or Android)? I can successfully open this file on the Adobe Acrobat Mobile Reader for iOS.
Copy link to clipboard
Copied
Does not open in Windows 10 Adboe Acrobat Reader DC ver: 2020.013.20074
Most recent version for Windows 10 downloaded from Adobe.
Copy link to clipboard
Copied
OK. With some of my comrades here at Adobe we have found the problem.
In fact, the file you provided does not conform to the ISO PDF file specification which states:
The last line of the file shall contain only the end-of-file marker, %%EOF.
This particular file contained some JavaScript and HTML after the %%EOF. And that is strictly non-kosher and could be indicative of other corruption in the PDF file. A “fixed” copy of the file is attached!
The fact is that the other viewers (including Adobe's own mobile and web-based viewers seem to be lenient about this error and after opening the PDF file, search backwards to find the %%EOF characters. We will investigate further and see whether we can add some “leniency” to our desktop products (or at least provide better diagnostics).
Copy link to clipboard
Copied
Any progress on this? It's still happening with the latest version of Acrobat DC.
Copy link to clipboard
Copied
Hi @pzaidel ,
Hope you are doing well.
Thank you for reaching out to us. We would love to help you out with this. Could you please provide us little more information? If possible do share some relevant screenshots with us. Once we've got that information from you, we can take a closer look.
Regards
Ria
Copy link to clipboard
Copied
Ria,
After we upgraded to SQL Server Reporting Services 2019 report exported to PDF and able to open in all browsers & Nitro PDF, but unable to open acrobat reader. It’s working fine in SSRS 2016, but after we upgrade it showing error to open.
While open the PDF in acrobat reader getting this message “There was an error open this document .The file is damaged could not be repaired.
I have attached the document for your review.
Copy link to clipboard
Copied
Hi @Akil3 - we ended up having to make code changes to how we termiate the file stream back from SSRS. Removing the highlighted line below, fixed the issue:
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Here is the complete changeset @Akil3
Copy link to clipboard
Copied
You have to have the Response.End() because this will ensure the response is fully flushed and ended correctly.
If you don't have the Response.End() the render will add %%EOF to the end of the PDF portion of the file.
If you open the PDF in Notepad, you can see the %%EOF added incorrectly.
Your PDF file (in Notepad) will look something like this
endstream
endobj
startxref
75456
%%EOF
Copy link to clipboard
Copied
Our group at Arizona State University is having the same problem with Microsoft SQL Server Reporting Services (SSRS) 2017 when exporting reports as PDF files. Adobe Acrobat DC version 2022.001.20085 on Windows 10 is unable to open those files, stating: "There was an error opening this document. The file is damaged and could not be repaired."
Based on @Dov Isaacs comments, I am able to remove the text after %%EOF in the affected files and am then able to open them. But this is not something we can ask our customers to do. This was not a problem with SSRS 2012, even though the same text existed after the %%EOF line.
I am attaching three files generated by a third party vendor's application:
Does Adobe have an expected time when an update will be made available that will fix this problem since Dov mentioned he was able to "successfully open this file on the Adobe Acrobat Mobile Reader for iOS"? This is affecting our reporting services server upgrade schedule.
Copy link to clipboard
Copied
Hello everybody, any update for this issue?
Thank you,
Alex
Find more inspiration, events, and resources on the new Adobe Community
Explore Now