aspose file tools*
The moose likes Other Open Source Projects and the fly likes Error while Exporting the display tag table content as a .pdf   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Error while Exporting the display tag table content as a .pdf   " Watch "Error while Exporting the display tag table content as a .pdf   " New topic
Author

Error while Exporting the display tag table content as a .pdf

k vani
Greenhorn

Joined: Mar 29, 2010
Posts: 2
Hi,

I was trying to export the display tag table data into a .pdf file using the latest code available in the SourceForce.net: Displaytag-1.2.jar library.

However i am getting an error while exporting to .pdf :
It Says abode reader could not open the .pdf file because it is either not a supported file type or because the file has been damaged(for example, it was sent as an email attachment and wasn't correctly decoded).

Please suggest.
Thanks


Find Below the Code the have used.

<display:table class="displayTable" name="requestScope.CouProceedingType" export="true" pagesize="${resultsetSize}" cellpadding="${paddingValue}" decorator = "nj.lwd.courts.web.decorators.reftab.ProceedingTypeDecorator" requestURI="courtsonline.htm" sort="list">
<display:column property="link1" media="html" titleKey="proceedingType.label.code" sortable="true" sortProperty="cdePrcdType"/>
<display:column media="pdf" titleKey="proceedingType.label.code" property="cdePrcdType"/>
<display:column property="descPrcdType" titleKey="common.label.desc" sortable="true"/>
<display:column property="flgReschedule" titleKey="common.label.resc" sortable="true" style="text-align:center"/>
<display:column property="displayOrder" titleKey="common.label.displayOrder" sortable="true" style="text-align:right"/>
<display:column property="flgObsolete" titleKey="common.label.obs" sortable="true" style="text-align:center"/>
<display:setProperty name="export.pdf" value="true" />
<display:setProperty name="export.excel" value="true" />
<display:setProperty name="export.csv" value="true" />
<display:setProperty name="export.xml" value="true" />
</display:table>
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Welcome to Javaranch! Could it be a version of PDF problem?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
k vani
Greenhorn

Joined: Mar 29, 2010
Posts: 2
Hi,


When i am trying to export the display tag table data to a pdf. I find the below url's generated on different files on different servers as below:

link1
********
<div class="exportlinks">Export options:
<a href="courtsonline.htm?6578706f7274=1&d-49653-e=5&_flowExecutionKey=_cD4EB0A93-6F3E-D17B-4D62-5DF1A8C8A647_k65D701A3-2C5A-2D93-A2B9-6603720B3866"><span class="export pdf">PDF </span></a></div>


link2
*******
<div class="exportlinks">Export options:
<a href="courtsonline.htm?6578706f7274=1&_flowExecutionKey=_cFFBB5B50-8805-5255-7998-04A5F13C427E_kB681F035-5943-2540-CD15-F377665C98C0&d-49653-e=5"><span class="export pdf">PDF </span></a></div>


link3
******
<div class="exportlinks">Export options:
<a href="courtsonline.htm?d-147835-e=5&6578706f7274=1&_flowExecutionKey=_c74A979CE-582B-895A-8DE5-BAC06D4B8446_kEFD0DA7D-5805-C219-7195-E62D5AE19624"><span class="export pdf">PDF </span></a></div>


if the need to generate this &d-49653-e=5; at the end like that of link2. what do i do?


We’ve been able to narrow the problem down some more… We’re having a problem with displaytag rendering parameters in different orders. Our application uses both Spring Webflow, and Sitemesh. In order to export from displaytag, we added an exclude to the Sitemesh decorator.xml, that starts with our context path, and ends with the displaytag export parameter (“ourwebapp*-e-5”).


This approach worked fine on different servers… the spring flow execution key would appear before the displaytag export parameter. However, we’ve just run across other servers where it’s putting the displaytag export parameter in the center of the parameter string. We could modify our exclude, but there’s always the chance we may have the “-e=5” string generated by something else.


Is there a way to control the order displaytag generates the export URL?



Thanks.




Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Not sure I'm afraid....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while Exporting the display tag table content as a .pdf