I have gone through all related threads in this forum but could not find the solution for displaying image in exported files ( pdf , rtf , excel ). Do I need to write a decorator for this ? Can anyone please help by posting the relavant code.
I am able to export text caption but not an image in the caption.
Here is my code which works properly for html (displays image and caption underneath).
In CSS, class 'ppcLogoLink' is defined as follows.
.ppcLogoLink {PADDING-TOP: 125px; BACKGROUND: transparent url(/ptid/images/ppc_logo.gif) no-repeat center}
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
getCell(String cellValue) throws BadElementException is private method in
PdfView .class
if you override it as protected how you can call super.getCell(cellValue); ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have gone through all related threads in this forum but could not find the solution for displaying image in exported files ( pdf , rtf , excel ). Do I need to write a decorator for this ? Can anyone please help by posting the relavant code.
I am able to export text caption but not an image in the caption.
Here is my code which works properly for html (displays image and caption underneath).
<display:table name="${tblSelQry.rows}" id="outerTbl" class="its" sort="list" export="true" pagesize="8" cellspacing="3" style="width:600px;">
<display:caption title="Additional Notes table" media="html pdf excel rtf" class="ppcLogoLink" style="font-weight:bold;">Additional Notes table</display:caption>
</display:table>
In CSS, class 'ppcLogoLink' is defined as follows.
.ppcLogoLink {PADDING-TOP: 125px; BACKGROUND: transparent url(/ptid/images/ppc_logo.gif) no-repeat center}
Thanks
I have even tried the following but pdf is displaying html code.
<display:column title="" media="pdf">
<img src="/ptid/images/ppc_logo.gif" />
</display:column>
Hello,
I had the same issue so I created my own PdfView:
package export;
import java.net.URL;
import org.apache.log4j.Logger;
import org.displaytag.export.PdfView;
import com.lowagie.text.BadElementException;
import com.lowagie.text.Cell;
import com.lowagie.text.Image;
public class ImagePdfView extends PdfView {
}
then in the displaytag.properties:
export.pdf.class=export.ImagePdfView
Hope that will help others...
Regards,
Carl
getCell(String cellValue) throws BadElementException is private method in
PdfView .class
if you override it as protected how you can call super.getCell(cellValue); ?