You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Amardeep Singh Jhajj (JIRA)" <ji...@apache.org> on 2015/04/18 14:06:58 UTC

[jira] [Commented] (OFBIZ-5441) URLs in PDF files are not handled correctly

    [ https://issues.apache.org/jira/browse/OFBIZ-5441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501323#comment-14501323 ] 

Amardeep Singh Jhajj commented on OFBIZ-5441:
---------------------------------------------

Actually this description field of Invoice item is not dedicated for fo.ftl and it is being used in various places. We can use some kind of regular expression logic to check for html anchor tag (<a/>) to replace that with fo.ftl method (basic-link) to show the link.

But IMO, it seems to be less generic approach for handling such case as per the best practices we follow because we have many description fields in many entities. Any suggestion for solution is welcome. Thanks

> URLs in PDF files are not handled correctly
> -------------------------------------------
>
>                 Key: OFBIZ-5441
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5441
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Priority: Minor
>
> When a PDF file contains a reference to a promotion like when you buy a WG-5569 (Tiny Chrome Widget) and get a free WG-1111 (Micro Chrome Widget). You end with a corresponding invoice containing <<Spend more than $100 on your favorite widgets and gizmos and get a free <a href="/ecommerce/control/product?category_id=20111&amp;product_id=WG-1111">Micro Chrome Widget</a>!>> instead of a real link. 
> It's possible to generare a link in a PDF with FOP, we need to
> # dynamically define a fop.base using a ftl transform refs: http://xmlgraphics.apache.org/fop/0.95/configuration.html#general-elements http://xmlgraphics.apache.org/fop/faq.html#MalformedURL
> # here is an example from ProductionRun.fo.ftl
> {code}
> <fo:table-cell padding="2pt">
>     <fo:block><fo:basic-link background-color="lightblue" external-destination="<@o...@ofbizContentUrl>">${uiLabelMap.CommonView}</fo:basic-link></fo:block>
> </fo:table-cell>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)