I'm experiencing a problem with a webform which receives a binary steam back
and display it as a PDF.
The problem that is experienced is when the report reads parameters from the
querystring passed to the webform. The parameters passed to the page will
then be passed to the Reporting Services web service. The page attempts to
open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
Reader could not open 'paXXXXXX.fdf' because it is either not a supported
file type or because the file has been corrupted (for example, it was sent as
an email attachment and wasn't correctly decoded)."
This problem only happens when exporting to the PDF format and runs fine in
all other formats. This error only occurs when the report is run in version
6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
Services used has SP1 installed.I had a similar problem. It turned out that the web form was adding its HTML
to the end of the PDF file. Apparently Excel didn't care but Acrobat V6 did.
I fixed it by overriding the page's Render method and only called
MyBase.Render(output) when the mime type was HTML. This prevented the page's
HTML being rendered and stuck on the end of the PDF or any other non-html
stream.
Hope that helps.
Grahame
"Aidan" wrote:
> I'm experiencing a problem with a webform which receives a binary steam back
> and display it as a PDF.
> The problem that is experienced is when the report reads parameters from the
> querystring passed to the webform. The parameters passed to the page will
> then be passed to the Reporting Services web service. The page attempts to
> open the PDF, but when Adobe Acrobat Reader opens, an error appears: "Adobe
> Reader could not open 'paXXXXXX.fdf' because it is either not a supported
> file type or because the file has been corrupted (for example, it was sent as
> an email attachment and wasn't correctly decoded)."
> This problem only happens when exporting to the PDF format and runs fine in
> all other formats. This error only occurs when the report is run in version
> 6 of Acrobat. In version 7 it is not a problem. The instance of Reporting
> Services used has SP1 installed.
Showing posts with label display. Show all posts
Showing posts with label display. Show all posts
Wednesday, March 28, 2012
Friday, March 23, 2012
PDF Byte Error?
I've been reading through the group and seems like a lot of people
have been trying to display the report as a PDF in IE. However, the
byte stream is wrong so it won't allow it.
Does this happen in both methods that generate the output: the SOAP
Render method, and the URL Access (Format='PDF')?
Also, can someone tell me what the correct btye order/size needs to
be. We will use the render method, and then try to correct it by
writing a program. We'll then use the 'corrected' file and display in
a web browser.
Thanks,
rwiethornActually, it displays correctly in IE (which just launches Acrobat to
display the file).
The problem is that third-party tools for post-processing PDF aren't as
forgiving as Acrobat and might have trouble with our noncompliant format.
(We are, however, aware of the bug and have it in the queue to get fixed...
No estimate on when)
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0408061300.54ad3e7d@.posting.google.com...
> I've been reading through the group and seems like a lot of people
> have been trying to display the report as a PDF in IE. However, the
> byte stream is wrong so it won't allow it.
> Does this happen in both methods that generate the output: the SOAP
> Render method, and the URL Access (Format='PDF')?
> Also, can someone tell me what the correct btye order/size needs to
> be. We will use the render method, and then try to correct it by
> writing a program. We'll then use the 'corrected' file and display in
> a web browser.
> Thanks,
> rwiethorn|||Hello,
I've found in this group that you have to set Language property of your
report to an expression which contains a '-'.
Fr is not supported but Fr-fr is Ok.
This problem occurs only when you want to generate PDF format.
Jerome Berthaud (MCSD)
http://www.winsight.fr
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0408061300.54ad3e7d@.posting.google.com...
> I've been reading through the group and seems like a lot of people
> have been trying to display the report as a PDF in IE. However, the
> byte stream is wrong so it won't allow it.
> Does this happen in both methods that generate the output: the SOAP
> Render method, and the URL Access (Format='PDF')?
> Also, can someone tell me what the correct btye order/size needs to
> be. We will use the render method, and then try to correct it by
> writing a program. We'll then use the 'corrected' file and display in
> a web browser.
> Thanks,
> rwiethorn
have been trying to display the report as a PDF in IE. However, the
byte stream is wrong so it won't allow it.
Does this happen in both methods that generate the output: the SOAP
Render method, and the URL Access (Format='PDF')?
Also, can someone tell me what the correct btye order/size needs to
be. We will use the render method, and then try to correct it by
writing a program. We'll then use the 'corrected' file and display in
a web browser.
Thanks,
rwiethornActually, it displays correctly in IE (which just launches Acrobat to
display the file).
The problem is that third-party tools for post-processing PDF aren't as
forgiving as Acrobat and might have trouble with our noncompliant format.
(We are, however, aware of the bug and have it in the queue to get fixed...
No estimate on when)
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0408061300.54ad3e7d@.posting.google.com...
> I've been reading through the group and seems like a lot of people
> have been trying to display the report as a PDF in IE. However, the
> byte stream is wrong so it won't allow it.
> Does this happen in both methods that generate the output: the SOAP
> Render method, and the URL Access (Format='PDF')?
> Also, can someone tell me what the correct btye order/size needs to
> be. We will use the render method, and then try to correct it by
> writing a program. We'll then use the 'corrected' file and display in
> a web browser.
> Thanks,
> rwiethorn|||Hello,
I've found in this group that you have to set Language property of your
report to an expression which contains a '-'.
Fr is not supported but Fr-fr is Ok.
This problem occurs only when you want to generate PDF format.
Jerome Berthaud (MCSD)
http://www.winsight.fr
"rwiethorn" <rwiethorn2002@.yahoo.com> wrote in message
news:553a0349.0408061300.54ad3e7d@.posting.google.com...
> I've been reading through the group and seems like a lot of people
> have been trying to display the report as a PDF in IE. However, the
> byte stream is wrong so it won't allow it.
> Does this happen in both methods that generate the output: the SOAP
> Render method, and the URL Access (Format='PDF')?
> Also, can someone tell me what the correct btye order/size needs to
> be. We will use the render method, and then try to correct it by
> writing a program. We'll then use the 'corrected' file and display in
> a web browser.
> Thanks,
> rwiethorn
Subscribe to:
Posts (Atom)