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

2015-04-21 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux edited comment on OFBIZ-5441 at 4/21/15 8:26 AM:
-

I checked, this is no longer a problem using NoTo fonts, see OFBIZ-5917


was (Author: jacques.le.roux):
I checked, this is no longer a problem using NoTo fonts, see r1674586

 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- (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=20111amp;product_id=WG-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:blockfo: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
 {code}



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


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

2015-04-18 Thread Jacques Le Roux (JIRA)

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

Jacques Le Roux edited comment on OFBIZ-5441 at 4/18/15 1:43 PM:
-

The problem is more than that, we actually have to handle 
InvoiceItem.descriptions like

description=Spend more than $100 on your favorite widgets and gizmos and get a 
free lt;a 
href=quot;/ecommerce/control/product?category_id=20111amp;amp;product_id=WG-quot;gt;Micro
 Chrome Widgetlt;/agt;!

See for instane this one
 InvoiceItem amount=-59.990 createdStamp=2013-12-19 22:31:11.578 
createdTxStamp=2013-12-19 22:31:07.921 description=Spend more than $100 on 
your favorite widgets and gizmos and get a free lt;a 
href=quot;/ecommerce/control/product?category_id=20111amp;amp;product_id=WG-quot;gt;Micro
 Chrome Widgetlt;/agt;! invoiceId=CI3 invoiceItemSeqId=6 
invoiceItemTypeId=ITM_PROMOTION_ADJ lastUpdatedStamp=2013-12-19 
22:31:11.578 lastUpdatedTxStamp=2013-12-19 22:31:07.921 
parentInvoiceId=CI3 parentInvoiceItemSeqId=5 productId=WG- 
quantity=1.00/

So, to generate the url inside the generated PDF file, we need to parse the 
InvoiceItem.description inside invoiceReportItems.fo.ftl.

Also in ProductionRun.fo.ftl (the only place where we currently have a 
fo:basic-link external-destination=...) the external-destinationattribute is 
wrongly completed. It misses the url('...') part in 
external-destination=url('...'). And, as you mentionned, the generated url is 
incomplete. I believe we will need a new transform for URLs in *fo.ftl files.


was (Author: jacques.le.roux):
The problem is more than we actually have to handle InvoiceItem.descriptions 
like

description=Spend more than $100 on your favorite widgets and gizmos and get a 
free lt;a 
href=quot;/ecommerce/control/product?category_id=20111amp;amp;product_id=WG-quot;gt;Micro
 Chrome Widgetlt;/agt;!

See for instane this one
 InvoiceItem amount=-59.990 createdStamp=2013-12-19 22:31:11.578 
createdTxStamp=2013-12-19 22:31:07.921 description=Spend more than $100 on 
your favorite widgets and gizmos and get a free lt;a 
href=quot;/ecommerce/control/product?category_id=20111amp;amp;product_id=WG-quot;gt;Micro
 Chrome Widgetlt;/agt;! invoiceId=CI3 invoiceItemSeqId=6 
invoiceItemTypeId=ITM_PROMOTION_ADJ lastUpdatedStamp=2013-12-19 
22:31:11.578 lastUpdatedTxStamp=2013-12-19 22:31:07.921 
parentInvoiceId=CI3 parentInvoiceItemSeqId=5 productId=WG- 
quantity=1.00/ 
 
So, to generate the url inside the generated PDF file, we need to parse the 
InvoiceItem.description inside invoiceReportItems.fo.ftl. 
 
Also in ProductionRun.fo.ftl (the only place where we currently have a 
fo:basic-link external-destination=...) the external-destinationattribute is 
wrongly completed. It misses the url('...') part in 
external-destination=url('...'). And, as you mentionned, the generated url is 
incomplete. I believe we will need a new transform for URLs in *fo.ftl files.

 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- (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=20111amp;product_id=WG-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:blockfo: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
 {code}



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