• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to Javaranch! Could it be a version of PDF problem?
 
k vani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure I'm afraid....
 
There are 29 Knuts in one Sickle, and 17 Sickles make up a Galleon. 42 tiny ads in a knut:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic