HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › Troubleshooting › German umlauts within custom JSP tag
- This topic has 7 replies, 2 voices, and was last updated Mar 18, 2015
14:59:36 byPD4ML.
-
AuthorPosts
-
March 18, 2015 at 12:58#27000
Hi there,
I have the following issue:
I use PD4ML tags library which gets a custom tag as a body of PDF. Additionally I use headers and footers also as a custom tags. So the umlauts ö,ü,ß working fine, but ä sometimes shows broken character (a?).
Could you please check it? It’s really interesting because in the same document could be valid and broken umlauts…
P.S. See attached exampleMarch 18, 2015 at 13:10#29689Unfortunately you did not publish a JSP code snippet to see the way you defines headers/footers.
Try to define headers with HTML code using
<pd4ml:page.header>instead of<pd4ml:header>(and footers correspondingly).Does it change anything?
March 18, 2015 at 13:16#29690Nope.. The issue that header/footer shows the umlauts without any problems.. But body sometime fails with ä as I said.
The code looks like that:<pd4ml:usettf from="java:fonts" serif="Times New Roman" sansserif="Arial" monospace="Courier New" /><br /> <pd4ml:page.header><br /> <t:pdf-header companyName="${companyName}" personName="${personName}" address="${companyAddress}" /><br /> </pd4ml:page.header><br /> <pd4ml:page.footer height="50"><br /> <t:pdf-footer partner="${invoice.partner}" /><br /> </pd4ml:page.footer><br /> <t:pdf-invoice invoice="${invoice}"><br /> <jsp:attribute name="title">${title}</jsp:attribute><br /> <jsp:body><br /> <table class="table padded"><br /> <tr class="header"><br /> <th width="10%" class="first"><spring:message code="pdf.finance.invoices.executionDate" /></th><br /> <th width="50%"><spring:message code="pdf.finance.invoices.product" /></th><br /> <th width="5%" class="text-right"><spring:message code="pdf.finance.invoices.quantity" /></th><br /> <th width="15%" class="text-right"><spring:message code="pdf.finance.invoices.pricePerItem" /></th><br /> <th width="10%" class="text-right"><spring:message code="pdf.finance.invoices.vat" /></th><br /> <th width="10%" class="text-right"><spring:message code="pdf.common.finance.amount" /></th><br /> </tr></table><br /> </jsp:body><br /> </t:pdf-invoice>So inside
<jsp:body>there are issues..March 18, 2015 at 13:21#29691Hmm… Try to add enable=”false” to
<pd4ml:transform>– it should return HTML instead of PDF. Check if all placeholders are substituted with data correctly. I would suspect some of them appear as ISO-8859-1, others as UTF-8 – encoded.March 18, 2015 at 13:48#29692@PD4ML wrote:
Hmm… Try to add enable=”false” to
<pd4ml:transform>– it should return HTML instead of PDF. Check if all placeholders are substituted with data correctly. I would suspect some of them appear as ISO-8859-1, others as UTF-8 – encoded.Just checked the database data – everything stored as UTF..
With enable=”false” shows the valid valuesMarch 18, 2015 at 14:03#29693Can you generate such HTML with a sensitive data stripped off and send it to support pd4ml com?
March 18, 2015 at 14:16March 18, 2015 at 14:59#29695A usual UTF-8 code for ä is “C3 A4”, in your document it is “61 CC 88” which is actually a separate definition for a and diacritical marks (umlaut dots) to be rendered as a single glyph.
I have found an explanation by the link http://www.redleopard.com/2008/12/character-codes-and-encoding/
Unfortunately PD4ML does not support that notation for the time being. So the only workaround is to replace “61 CC 88” byte chains with “C3 A4” or tune your database to return UNICODE data as regular UTF-8
-
AuthorPosts
The forum ‘Troubleshooting’ is closed to new topics and replies.
