My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 100: Export PDF Error : Due to content size
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Jul 2008


 
Reported by pohzysg, Apr 23, 2008
What steps will reproduce the problem?
1. when export pdf, due to response.setContentLength(contents.length); the 
pdf was not exported correctly
2.
3.

What is the expected output? What do you see instead?
Expected a proper PDF but got a error pdf that could not be opened.

What version of the product are you using? On what operating system?
version 2.3.1 on windows xp

Please provide any additional information below.
Using Tomcat server, not using spring framework.just normal jsp.
 
Apr 24, 2008
#1 extremec...@gmail.com
Could you explain more what you mean by "due to
response.setContentLength(contents.length)"? What kind of error messages do you get?
Status: Accepted
Apr 24, 2008
#2 pohzysg
Actually i did not enable the logging hence here was no error messages.

With the line, the pdf was exported but was unable to open.
Then when I remove the line and i was able to export the pdf properly.

Hope the above helps..

Apr 24, 2008
#3 extremec...@gmail.com
That is really strange. Could you tell me the value you get when you do a
contents.length? Is this a really big file that you are creating?
Apr 28, 2008
#4 pohzysg
Is the value is 1960. Is actually a very small file.... the file size is only 1,659 
bytes....




May 8, 2008
#5 pohzysg
Sorry may i check if there is any updates on this issue?
May 9, 2008
#6 extremec...@gmail.com
I guess I thought that you were ok...sorry, my fault.

I would tend to think that there is something with your web application that is
conflicting with writing out the export out to the response. Usually servlet filters
can cause problems, especially if you have quite a few of them all trying to modify
the response.

One thing you could do to test is try the CSV export as that is the simplest export
and requires no additional jar files. See if you get the same error with that as a test.

May 10, 2008
#7 pohzysg
Don't say sorry. I manage to overcome my problem after removing the line and 
recompiling the jar file. Just wish to understand what might be the issue that might 
have cause the problem. 

OK, however my application does not uses any filters. Then also i have tried 
exporting to CSV with the orginal jar file and it works fine. 

May 10, 2008
#8 extremec...@gmail.com
Thanks for the info. I really expected the CSV to not work either. So unfortunately
our only choice now is figuring out why this does not work in your environment. 

For that you might try a different tomcat server (5.5 versus 6.0). Or maybe see if
there are updated jars for any of the PDF libraries (Flying Saucer or iText). You
could also try putting my examples war file in your server and seeing if the PDF
works there as there have been no complaints of the PDF not working. Another fair
test would be trying filtering the result set down to very little and see if small
results go through. 

I remember working with Ehcache before and having to compile my own version because
of the way the response was being handled in Tomcat 5 for that particular jar file.
Once we went to the newer version of Tomcat the issue was resolved. The problem was
with the timing of when the response stream was being closed.

When there are issues like this I always feel like I'm hanging the developer out to
dry but there is so much out of my control. The JMesa library offers PDF support only
because of the Flying Saucer and iText API. At some point I would really like a more
custom PDF version using straight iText.

Just so I know too...what version of Tomcat are you using?

May 11, 2008
#9 pohzysg
I am using tomcat 6.0.16. This is the following outcome.

1. I have tried the examples war file. The PDF works fine.
2. I only have 1 records so suppose is the small enough.

Suppose based on the above, it might be due to the way Spring handle the response 
already.That is the only thing that my application is not using.

If time permits i will carry on with the testing.
Jul 3, 2008
#10 extremec...@gmail.com
I am not able to duplicate this issue so I will have to close it for now.
Status: WontFix

Powered by Google Project Hosting