Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5441

URLs in PDF files are not handled correctly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Trunk, Upcoming Branch
    • None
    • accounting
    • None
    • Bug Crush Event - 21/2/2015

    Description

      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&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

      1. 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
      2. here is an example from ProductionRun.fo.ftl
        <fo:table-cell padding="2pt">
            <fo:block><fo:basic-link background-color="lightblue" external-destination="<@ofbizContentUrl>/content/control/ViewBinaryDataResource?dataResourceId=${productionRunContent.drDataResourceId}</@ofbizContentUrl>">${uiLabelMap.CommonView}</fo:basic-link></fo:block>
        </fo:table-cell>
        

      Attachments

        Issue Links

          Activity

            People

              priya.sharma.9362 Priya Sharma
              jleroux Jacques Le Roux
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: