Jump to content
Changes to the Jaspersoft community edition download ×

Html content display issues for HTML and PDF reports (textElement with makrup='html')


BhuvaRD

Recommended Posts

Steps to reproduce the bug are given as follow.
1. Create a Jasper report with textElement with markup='html'. I have attached sample jrxml named "Html_N_PDF_Report.jrxml".'
2. Give the Html content as follow for the textElement with markup=’html’.
   "<p>Normal</p><p><span style="font-weight:bold">Bold</span> <span style="font-style:italic"><span style="font-weight:bold">BoldItalic</span></span></p><p><span style="font-style:italic">Italic</span> <u><span style="font-style:italic">ItalicUnderScore</span></u></p><p><u>UnderScore</u> <span style="font-weight:bold"><u>UnderScoreBold</u></span> <span style="font-style:italic"><span style="font-weight:bold"><u>UnderScoreBoldItalic</u></span></span></p><p><span style="text-decoration:line-through">Strikethrough</span>  <span style="text-decoration:line-through"><u><span style="font-style:italic"><span style="font-weight:bold">BoldItalicUnderscoreStrikethrough</span></span></u></span></p><p>Test<span style="font-weight:bold"><sub>Subscript</sub></span></p><p>Test<u><span style="font-style:italic"><sup>SuperScript</sup></span></u></p><ol><li>Item#1</li><li>Item#2</li></ol><ul><li>Bulllet#1</li><li>Bullet#2</li></ul><div style="margin-left: 40px;">Indentation#1</div><div style="margin-left: 80px;">Indentation#2</div><div>Left alinged</div><div style="text-align: center;">Center aligned</div><div style="text-align: right;">Right aligned</div><div>This is a text paragraph to verify that justify works fine. But there is an issue with html display.</div><div><a href="https://community.jaspersoft.com" shape="rect">https://community.jaspersoft.com</a></div><div><hr></hr><table border="1" cellpadding="1" cellspacing="1" style="width: 500px;"><tbody><tr><td colspan="1" rowspan="1">Sr. No.</td><td colspan="1" rowspan="1">Name</td><td colspan="1" rowspan="1">Age</td></tr><tr><td colspan="1" rowspan="1">1</td><td colspan="1" rowspan="1">Peter</td><td colspan="1" rowspan="1">20</td></tr><tr><td colspan="1" rowspan="1">2</td><td colspan="1" rowspan="1">John</td><td colspan="1" rowspan="1">30</td></tr></tbody></table><p> </p></div>"
   
2. Generate the report in Jasper studio. I had used Jasper Studio 6.8.0.
3. Export the report as Html.
4. Export the report as PDF.

Issues observed with Html Report. Refer "Html_Report_With_Html_Content.html"
    1. It doesn't display the underline text with strikethrough. For example, BoldItalicUnderscoreStrikethrough
    2. It doesn't respect indentation. For example, Indentation#1 and Indentation#2
    3. It doesn't respect the centre, right and justify alignment.
    4. It doesn't display the hyperlink with blue font and no underline when mouse is hovered on it.
    5. It doesn't display HTML table properly. For example, Html table with Sr.No. Name and Age at the end of the report

Issues observed with PDF Report. Refer "PDF_Report_With_Html_Content.pdf"
    1. It doesn't respect indentation. For example, Indentation#1 and Indentation#2
    2. It doesn't respect the centre, right and justify alignment.
    3. It doesn't display HTML table properly. For example, Html table with Sr.No. Name and Age at the end of the report


When I generate report with html text. For that I have used textElement with markup='html'.
But following HTML features doesn't work properly for HTML or PDF reports.

For HTML report following features doesn't work properly.
    1. It doesn't display HTML table properly.
    2. It doesn't display hyperlinks.
    3. It doesn't display indentation.
    4. It doesn't display the underline text with strikethrough.

For PDF report following features doesn’t work properly.
    1. It doesn't display HTML table properly.
    2. It doesn't display hyperlinks.
    3. It doesn't display indentation.
    4. It doesn't display the underline text with strikethrough.
    5. It doesn't display bold text.
    6. It doesn't display italic text.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...