You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Sumit Pandit <su...@hotwaxmedia.com> on 2009/08/13 09:03:47 UTC
PDF is not rendering properly.
Hello Devs
In Accounting -> Reports PDF is not rendering properly for numeric
value. For ex - It printed it like - $116.85
I have verified it for Income Statement and Trial Balance.
Thanks And Regards
Sumit Pandit
Re: PDF is not rendering properly.
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
wow,
thank you Scott!
Jacopo
On Aug 13, 2009, at 1:39 PM, Scott Gray wrote:
> Hi Jacopo,
>
> I was a bit curious so I took a look, the problem was that the $
> sign was being encoded twice, both by easpi and by freemarker so
> when fop came to decode it, it was going from &#36: to $
>
> Regards
> Scott
>
> On 13/08/2009, at 10:07 PM, Jacopo Cappellato wrote:
>
>> This is caused by the encoder used for special characters not
>> working properly with our FOP framework.
>> We can fix this by commenting out the following line in
>> widget.properties:
>>
>> screenfop.encoder=xml
>>
>> but I am worried because we will then have issues with some special
>> characters breaking the XML syntax of FO.
>>
>> The encoder that we are using for FOP (with screenfop.encoder=xml )
>> is (see StringUtil class):
>>
>> public static class XmlEncoder implements SimpleEncoder {
>> public String encode(String original) {
>> return StringUtil.defaultWebEncoder.encodeForXML(original);
>> }
>> }
>>
>> where defaultWebEncoder is an object with org.owasp.esapi.Encoder
>> class
>>
>> Should we use a different approach? Ideas?
>>
>> Jacopo
>>
>>
>> On Aug 13, 2009, at 9:03 AM, Sumit Pandit wrote:
>>
>>> Hello Devs
>>>
>>> In Accounting -> Reports PDF is not rendering properly for
>>> numeric value. For ex - It printed it like - $116.85
>>> I have verified it for Income Statement and Trial Balance.
>>>
>>> Thanks And Regards
>>> Sumit Pandit
>>
>
Re: PDF is not rendering properly.
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Jacopo,
I was a bit curious so I took a look, the problem was that the $ sign
was being encoded twice, both by easpi and by freemarker so when fop
came to decode it, it was going from &#36: to $
Regards
Scott
On 13/08/2009, at 10:07 PM, Jacopo Cappellato wrote:
> This is caused by the encoder used for special characters not
> working properly with our FOP framework.
> We can fix this by commenting out the following line in
> widget.properties:
>
> screenfop.encoder=xml
>
> but I am worried because we will then have issues with some special
> characters breaking the XML syntax of FO.
>
> The encoder that we are using for FOP (with screenfop.encoder=xml )
> is (see StringUtil class):
>
> public static class XmlEncoder implements SimpleEncoder {
> public String encode(String original) {
> return StringUtil.defaultWebEncoder.encodeForXML(original);
> }
> }
>
> where defaultWebEncoder is an object with org.owasp.esapi.Encoder
> class
>
> Should we use a different approach? Ideas?
>
> Jacopo
>
>
> On Aug 13, 2009, at 9:03 AM, Sumit Pandit wrote:
>
>> Hello Devs
>>
>> In Accounting -> Reports PDF is not rendering properly for numeric
>> value. For ex - It printed it like - $116.85
>> I have verified it for Income Statement and Trial Balance.
>>
>> Thanks And Regards
>> Sumit Pandit
>
Re: PDF is not rendering properly.
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
This is caused by the encoder used for special characters not working
properly with our FOP framework.
We can fix this by commenting out the following line in
widget.properties:
screenfop.encoder=xml
but I am worried because we will then have issues with some special
characters breaking the XML syntax of FO.
The encoder that we are using for FOP (with screenfop.encoder=xml ) is
(see StringUtil class):
public static class XmlEncoder implements SimpleEncoder {
public String encode(String original) {
return StringUtil.defaultWebEncoder.encodeForXML(original);
}
}
where defaultWebEncoder is an object with org.owasp.esapi.Encoder class
Should we use a different approach? Ideas?
Jacopo
On Aug 13, 2009, at 9:03 AM, Sumit Pandit wrote:
> Hello Devs
>
> In Accounting -> Reports PDF is not rendering properly for numeric
> value. For ex - It printed it like - $116.85
> I have verified it for Income Statement and Trial Balance.
>
> Thanks And Regards
> Sumit Pandit