You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Meeka Schenzski <mo...@gmail.com> on 2015/05/07 07:16:59 UTC

Cannot print/generate pdfs with INR currency

Hello,

Not sure what Im missing here and would love some help or guidance.

Im running ofbiz-12.04.05 and I've changed the default currency from USD to
INR. Ive created a new Invoice but when I try to generate a .pdf it is
failing with the below error.

Please help.

The Following Errors Occurred: Unable to transform FO file:
org.apache.fop.apps.FOPException: -1
java.lang.ArrayIndexOutOfBoundsException: -1

Logs: ==> error.log <== 2015-05-06 10:16:33,197
(http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
Unable to transform FO file: org.apache.fop.apps.FOPException: -1
java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:

==> fop.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
[LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
found. Substituting with "ZapfDingbats,normal,400".

==> ofbiz.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
[LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
found. Substituting with "ZapfDingbats,normal,400". 2015-05-06 10:16:33,197
(http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
Unable to transform FO file: org.apache.fop.apps.FOPException: -1
java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:


<?xml version="1.0" encoding="UTF-8"?>
<!-- Begin Template
component://common/webcommon/includes/reportTemplate.fo.ftl -->
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
        <fo:simple-page-master master-name="main-page"
              page-width="8.5in" page-height="11in"
              margin-top="0.4in" margin-bottom="0.4in"
              margin-left="0.6in" margin-right="0.4in">
            <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/>
            <fo:region-before extent="1.2in"/>
            <fo:region-after extent="0.4in"/>
        </fo:simple-page-master>
        <fo:simple-page-master master-name="main-page-landscape"
              page-width="11in" page-height="8.5in"
              margin-top="0.4in" margin-bottom="0.4in"
              margin-left="0.6in" margin-right="0.4in">
            <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/>
            <fo:region-before extent="1.2in"/>
            <fo:region-after extent="0.4in"/>
        </fo:simple-page-master>
    </fo:layout-master-set>

    <fo:page-sequence master-reference="main-page">

        <fo:static-content flow-name="xsl-region-before">
            <fo:table table-layout="fixed" width="100%">
                <fo:table-column column-number="1"
column-width="proportional-column-width(50)"/>
                <fo:table-column column-number="2"
column-width="proportional-column-width(50)"/>
                <fo:table-body>
                    <fo:table-row>
                        <fo:table-cell>
<!-- Begin Template
component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->

<fo:block text-align="left">
    <fo:external-graphic src="/images/ofbiz_logo.gif"
overflow="hidden" height="40px" content-height="scale-to-fit"
content-width="2.00in"/>
</fo:block>

<fo:block font-size="8pt">
    <fo:block>Global Spice Trading Partners</fo:block>

            <!-- Begin Template
component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
-->
  <fo:block>2003 Open Blvd</fo:block>

  <fo:block>Open City, CA 999999</fo:block>
    <fo:block>
      United States
    </fo:block>
<!-- End Template
component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
-->


    <fo:list-block provisional-distance-between-starts=".5in">
        <fo:list-item>
            <fo:list-item-label>
                <fo:block>Tax ID:</fo:block>
            </fo:list-item-label>
            <fo:list-item-body start-indent="body-start()">
                <fo:block>12-3456789</fo:block>
            </fo:list-item-body>
        </fo:list-item>
        <fo:list-item>
            <fo:list-item-label>
                <fo:block>Email:</fo:block>
            </fo:list-item-label>
            <fo:list-item-body start-indent="body-start()">
                <fo:block>ofbiztest@example.com</fo:block>
            </fo:list-item-body>
        </fo:list-item>
    </fo:list-block>
</fo:block>
<!-- End Template
component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->

                        </fo:table-cell>
                        <fo:table-cell>
<!-- Begin Template
component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
-->
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="1in"/>
<fo:table-column column-width="2.5in"/>
<fo:table-body>
<fo:table-row>
  <fo:table-cell>
     <fo:block number-columns-spanned="2" font-weight="bold">Sales
Invoice</fo:block>
  </fo:table-cell>
</fo:table-row>

<fo:table-row>
  <fo:table-cell><fo:block>Inv. Date:</fo:block></fo:table-cell>
  <fo:table-cell><fo:block>May 4, 2015</fo:block></fo:table-cell>
</fo:table-row>

<fo:table-row>
  <fo:table-cell><fo:block>Cust.Nr:</fo:block></fo:table-cell>
  <fo:table-cell><fo:block>10000</fo:block></fo:table-cell>
</fo:table-row>


<fo:table-row>
  <fo:table-cell><fo:block>Inv.Nr:</fo:block></fo:table-cell>
  <fo:table-cell><fo:block>CI3</fo:block></fo:table-cell>
</fo:table-row>
  <fo:table-row>
    <fo:table-cell><fo:block>Descr:</fo:block></fo:table-cell>
    <fo:table-cell><fo:block>pepps</fo:block></fo:table-cell>
  </fo:table-row>

<!--fo:table-row>
  <fo:table-cell><fo:block>Status</fo:block></fo:table-cell>
  <fo:table-cell><fo:block
font-weight="bold">In-Process</fo:block></fo:table-cell>
</fo:table-row-->
</fo:table-body>
</fo:table>
<!-- End Template
component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
-->

                        </fo:table-cell>
                    </fo:table-row>
                </fo:table-body>
            </fo:table>
        </fo:static-content>

        <fo:static-content flow-name="xsl-region-after">
            <fo:block font-size="10pt" text-align="center" space-before="10pt">
                Page <fo:page-number/> of <fo:page-number-citation
ref-id="theEnd"/>
            </fo:block>
        </fo:static-content>

        <fo:flow flow-name="xsl-region-body">
<!-- Begin Template
component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
-->
<fo:table table-layout="fixed" width="100%" space-after="0.3in">
   <fo:table-column column-width="3.5in"/>
    <fo:table-body>
      <fo:table-row >
        <fo:table-cell>
               <fo:block>To: </fo:block>
        <fo:block>No general/billing address found for party:10000</fo:block>
        </fo:table-cell>
    </fo:table-row>
  </fo:table-body>
</fo:table>
<!-- End Template
component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
-->
<!-- Begin Template
component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
-->


    <fo:table table-layout="fixed" width="100%" space-before="0.2in">
    <fo:table-column column-width="20mm"/>
    <fo:table-column column-width="85mm"/>
    <fo:table-column column-width="15mm"/>
    <fo:table-column column-width="25mm"/>
    <fo:table-column column-width="25mm"/>

    <fo:table-header height="14px">
      <fo:table-row border-bottom-style="solid"
border-bottom-width="thin" border-bottom-color="black">
        <fo:table-cell>
          <fo:block font-weight="bold">Product</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block font-weight="bold">Description</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block font-weight="bold" text-align="right">Qty</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block font-weight="bold" text-align="right">Unit Price</fo:block>
        </fo:table-cell>
        <fo:table-cell>
          <fo:block font-weight="bold" text-align="right">Amount</fo:block>
        </fo:table-cell>
      </fo:table-row>
    </fo:table-header>


    <fo:table-body font-size="10pt">

        <fo:table-row height="7px">
            <fo:table-cell
number-columns-spanned="5"><fo:block></fo:block></fo:table-cell>
        </fo:table-row>

        <fo:table-row>
           <fo:table-cell number-columns-spanned="2">
              <fo:block/>
           </fo:table-cell>
           <fo:table-cell number-columns-spanned="2">
              <fo:block font-weight="bold">TOTAL</fo:block>
           </fo:table-cell>
           <fo:table-cell text-align="right" border-top-style="solid"
border-top-width="thin" border-top-color="black">
              <fo:block>₹0.00</fo:block>
           </fo:table-cell>
        </fo:table-row>
        <fo:table-row height="7px">
           <fo:table-cell number-columns-spanned="5">
              <fo:block/>
           </fo:table-cell>
        </fo:table-row>
        <fo:table-row height="14px">
           <fo:table-cell number-columns-spanned="2">
              <fo:block/>
           </fo:table-cell>
           <fo:table-cell number-columns-spanned="2">
              <fo:block>Total excl. tax</fo:block>
           </fo:table-cell>
           <fo:table-cell text-align="right" border-top-style="solid"
border-top-width="thin" border-top-color="black">
              <fo:block>
₹0.00              </fo:block>
           </fo:table-cell>
        </fo:table-row>
    </fo:table-body>
 </fo:table>



 <fo:block></fo:block>
<!-- End Template
component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
-->

            <fo:block id="theEnd"/>
        </fo:flow>
    </fo:page-sequence>
</fo:root>
<!-- End Template
component://common/webcommon/includes/reportTemplate.fo.ftl -->

Re: Cannot print/generate pdfs with INR currency

Posted by miqbalb <mi...@gmail.com>.
I have seen wonderful response in this ofbiz mailing list, any idea which is
active support mailing list for opentaps.



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-print-generate-pdfs-with-INR-currency-tp4668043p4677152.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Cannot print/generate pdfs with INR currency

Posted by Jacques Le Roux <ja...@les7arts.com>.
Then it's not there. Remember Opentaps is not OFBiz and looks like opentaps-1.5.0. Jacques is like 5 years old...

Jacques

Le 14/02/2016 19:00, miqbalb a écrit :
> Thank you Jacques for reply. I am using opentaps-1.5.0.
>
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-print-generate-pdfs-with-INR-currency-tp4668043p4677150.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Cannot print/generate pdfs with INR currency

Posted by miqbalb <mi...@gmail.com>.
Thank you Jacques for reply. I am using opentaps-1.5.0.




--
View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-print-generate-pdfs-with-INR-currency-tp4668043p4677150.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Cannot print/generate pdfs with INR currency

Posted by Jacques Le Roux <ja...@les7arts.com>.
Works for me on the trunk demo.
See the bottom of the PDF you can generate at the bottom of this page
https://demo-trunk-ofbiz.apache.org/example/control/FormWidgetExamples

Note that if you use an older version this might not exist yet...

Jacques

Le 14/02/2016 11:10, miqbalb a écrit :
> I am also having problem while generating PDF for order or quote using United
> Arab Emirates Dirham AED as currency. Although default currency is changed
> and it shows currently in in order and invoice screen but when pdf is
> generated some how it picks up USD $ symbol
>
> Any idea if this is configuration problem or some bug.
>
> Regards
> -Iqbal
>
>
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-print-generate-pdfs-with-INR-currency-tp4668043p4677138.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Re: Cannot print/generate pdfs with INR currency

Posted by miqbalb <mi...@gmail.com>.
I am also having problem while generating PDF for order or quote using United
Arab Emirates Dirham AED as currency. Although default currency is changed
and it shows currently in in order and invoice screen but when pdf is
generated some how it picks up USD $ symbol

Any idea if this is configuration problem or some bug.

Regards
-Iqbal



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Cannot-print-generate-pdfs-with-INR-currency-tp4668043p4677138.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Re: Cannot print/generate pdfs with INR currency

Posted by Jacques Le Roux <ja...@les7arts.com>.
Try to render the example PDF using this link https://localhost:8443/example/control/printExampleFOPFonts

You should get the same than at http://demo-trunk-ofbiz.apache.org/example/control/printExampleFOPFonts
BTW this is accessible from this page at a bottom http://demo-trunk-ofbiz.apache.org/example/control/FormWidgetExamples

The log should look like

2015-05-11 11:39:37,398 |http-bio-8443-exec-3 |ControlServlet                |T| [[[printExampleFOPFonts(Domain:https://localhost)] Request Begun, 
encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
2015-05-11 11:39:37,427 |http-bio-8443-exec-3 |RequestHandler                |I| Rendering View [printExampleFOPFonts], 
sessionId=D0685F728FC2094180780B12C316382A.jvm1
2015-05-11 11:39:37,444 |http-bio-8443-exec-3 |ServiceDispatcher             |T| Sync service [example/getUserPreferenceGroup] finished in [2] 
milliseconds
2015-05-11 11:39:37,455 |http-bio-8443-exec-3 |ScreenFactory                 |I| Got 2 screens in 0.01s from: 
file:/C:/projectsASF/ofbiz/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml
2015-05-11 11:39:37,458 |http-bio-8443-exec-3 |UtilProperties                |I| ResourceBundle fop.properties (en) created in 0.002s with 3 properties
2015-05-11 11:39:37,720 |http-bio-8443-exec-3 |ApacheFopWorker               |I| FOP FontBaseURL: file:/c:/projectsASF/ofbiz/framework/webapp/config/
2015-05-11 11:39:37,726 |http-bio-8443-exec-3 |FOP                           |D| target-resolution set to: 72.0dpi (px2mm=0.35277778)
2015-05-11 11:39:38,392 |http-bio-8443-exec-3 |CommonHyphenation             |W| Substituted specified hyphenation character (0x2d) with 0x20 because 
the font doesn't have the specified hyphenation character: Symbol,normal,400
2015-05-11 11:39:38,427 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "t" (0x74, t) not available in font "SymbolMT".
2015-05-11 11:39:38,427 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "h" (0x68, h) not available in font "SymbolMT".
2015-05-11 11:39:38,428 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "e" (0x65, e) not available in font "SymbolMT".
2015-05-11 11:39:38,428 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "q" (0x71, q) not available in font "SymbolMT".
2015-05-11 11:39:38,429 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "u" (0x75, u) not available in font "SymbolMT".
2015-05-11 11:39:38,429 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "i" (0x69, i) not available in font "SymbolMT".
2015-05-11 11:39:38,429 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "c" (0x63, c) not available in font "SymbolMT".
2015-05-11 11:39:38,430 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "k" (0x6b, k) not available in font "SymbolMT".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "t" (0x74, t) not available in font "ZapfDingbats".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "h" (0x68, h) not available in font "ZapfDingbats".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "e" (0x65, e) not available in font "ZapfDingbats".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "q" (0x71, q) not available in font "ZapfDingbats".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "u" (0x75, u) not available in font "ZapfDingbats".
2015-05-11 11:39:38,431 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "i" (0x69, i) not available in font "ZapfDingbats".
2015-05-11 11:39:38,432 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "c" (0x63, c) not available in font "ZapfDingbats".
2015-05-11 11:39:38,432 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "k" (0x6b, k) not available in font "ZapfDingbats".
2015-05-11 11:39:38,434 |http-bio-8443-exec-3 |FOUserAgent                   |W| Glyph "?" (0x20b9) not available in font "Helvetica".
2015-05-11 11:39:38,525 |http-bio-8443-exec-3 |ServerHitBin                  |I| Visit delegatorName=default, ServerHitBin delegatorName=default
2015-05-11 11:39:38,528 |http-bio-8443-exec-3 |ControlServlet                |T| [[[printExampleFOPFonts(Domain:https://localhost)] Request Done- 
total:1.13,since last([printExampleFOPF...):1.13]]

Else you missed something and need to reiterate, notably check the 2 configuration files: fop.xconf and fop.properties

HTH

Jacques

Le 08/05/2015 07:08, Meeka Schenzski a écrit :
> Hi Jacques,
>
> I applied the changes locally but am still getting an error.
>
> [java] 2015-05-08 10:36:21,376 (http-bio-0.0.0.0-8443-exec-6)
> [LoggingEventListener.java:80 :WARN ] Font "NotoSans,normal,700" not found.
> Substituting with "any,normal,700".
>       [java] 2015-05-08 10:36:21,380 (http-bio-0.0.0.0-8443-exec-6)
> [ScreenFopViewHandler.java:121:ERROR] Unable to transform FO file:
> org.apache.fop.apps.FOPException: -1
>
> I copied the fonts into framework/resources/fonts/NotoSans and also
> installed them onto my system.
>
> Any idea what is happening? Do you need any more information from me?
> Please let me know and I will get back to you.
>
> Thank you again for your time.
> M
>
> On Thu, May 7, 2015 at 1:29 PM, Meeka Schenzski <
> mozilla.secureworks@gmail.com> wrote:
>
>> Super! Thank you so much for the quick response. I will apply the patch
>> and let you know how it goes.
>>
>> Regards,
>> M
>>
>> On Thu, May 7, 2015 at 12:22 PM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>>> You are in luck, I improved OFBiz to get this working, see
>>> https://issues.apache.org/jira/browse/OFBIZ-5917
>>>
>>> Now you just need to apply those change to your local version
>>>
>>> Jacques
>>>
>>>
>>> Le 07/05/2015 07:16, Meeka Schenzski a écrit :
>>>
>>>> Hello,
>>>>
>>>> Not sure what Im missing here and would love some help or guidance.
>>>>
>>>> Im running ofbiz-12.04.05 and I've changed the default currency from USD
>>>> to
>>>> INR. Ive created a new Invoice but when I try to generate a .pdf it is
>>>> failing with the below error.
>>>>
>>>> Please help.
>>>>
>>>> The Following Errors Occurred: Unable to transform FO file:
>>>> org.apache.fop.apps.FOPException: -1
>>>> java.lang.ArrayIndexOutOfBoundsException: -1
>>>>
>>>> Logs: ==> error.log <== 2015-05-06 10:16:33,197
>>>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>>>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>>>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>>>
>>>> ==> fop.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>>>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>>>> found. Substituting with "ZapfDingbats,normal,400".
>>>>
>>>> ==> ofbiz.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>>>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>>>> found. Substituting with "ZapfDingbats,normal,400". 2015-05-06
>>>> 10:16:33,197
>>>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>>>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>>>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <!-- Begin Template
>>>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>>>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>>>       <fo:layout-master-set>
>>>>           <fo:simple-page-master master-name="main-page"
>>>>                 page-width="8.5in" page-height="11in"
>>>>                 margin-top="0.4in" margin-bottom="0.4in"
>>>>                 margin-left="0.6in" margin-right="0.4in">
>>>>               <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/>
>>>>               <fo:region-before extent="1.2in"/>
>>>>               <fo:region-after extent="0.4in"/>
>>>>           </fo:simple-page-master>
>>>>           <fo:simple-page-master master-name="main-page-landscape"
>>>>                 page-width="11in" page-height="8.5in"
>>>>                 margin-top="0.4in" margin-bottom="0.4in"
>>>>                 margin-left="0.6in" margin-right="0.4in">
>>>>               <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/>
>>>>               <fo:region-before extent="1.2in"/>
>>>>               <fo:region-after extent="0.4in"/>
>>>>           </fo:simple-page-master>
>>>>       </fo:layout-master-set>
>>>>
>>>>       <fo:page-sequence master-reference="main-page">
>>>>
>>>>           <fo:static-content flow-name="xsl-region-before">
>>>>               <fo:table table-layout="fixed" width="100%">
>>>>                   <fo:table-column column-number="1"
>>>> column-width="proportional-column-width(50)"/>
>>>>                   <fo:table-column column-number="2"
>>>> column-width="proportional-column-width(50)"/>
>>>>                   <fo:table-body>
>>>>                       <fo:table-row>
>>>>                           <fo:table-cell>
>>>> <!-- Begin Template
>>>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>>>
>>>> <fo:block text-align="left">
>>>>       <fo:external-graphic src="/images/ofbiz_logo.gif"
>>>> overflow="hidden" height="40px" content-height="scale-to-fit"
>>>> content-width="2.00in"/>
>>>> </fo:block>
>>>>
>>>> <fo:block font-size="8pt">
>>>>       <fo:block>Global Spice Trading Partners</fo:block>
>>>>
>>>>               <!-- Begin Template
>>>>
>>>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>>>> -->
>>>>     <fo:block>2003 Open Blvd</fo:block>
>>>>
>>>>     <fo:block>Open City, CA 999999</fo:block>
>>>>       <fo:block>
>>>>         United States
>>>>       </fo:block>
>>>> <!-- End Template
>>>>
>>>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>>>> -->
>>>>
>>>>
>>>>       <fo:list-block provisional-distance-between-starts=".5in">
>>>>           <fo:list-item>
>>>>               <fo:list-item-label>
>>>>                   <fo:block>Tax ID:</fo:block>
>>>>               </fo:list-item-label>
>>>>               <fo:list-item-body start-indent="body-start()">
>>>>                   <fo:block>12-3456789</fo:block>
>>>>               </fo:list-item-body>
>>>>           </fo:list-item>
>>>>           <fo:list-item>
>>>>               <fo:list-item-label>
>>>>                   <fo:block>Email:</fo:block>
>>>>               </fo:list-item-label>
>>>>               <fo:list-item-body start-indent="body-start()">
>>>>                   <fo:block>ofbiztest@example.com</fo:block>
>>>>               </fo:list-item-body>
>>>>           </fo:list-item>
>>>>       </fo:list-block>
>>>> </fo:block>
>>>> <!-- End Template
>>>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>>>
>>>>                           </fo:table-cell>
>>>>                           <fo:table-cell>
>>>> <!-- Begin Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>>>> -->
>>>> <fo:table table-layout="fixed" width="100%">
>>>> <fo:table-column column-width="1in"/>
>>>> <fo:table-column column-width="2.5in"/>
>>>> <fo:table-body>
>>>> <fo:table-row>
>>>>     <fo:table-cell>
>>>>        <fo:block number-columns-spanned="2" font-weight="bold">Sales
>>>> Invoice</fo:block>
>>>>     </fo:table-cell>
>>>> </fo:table-row>
>>>>
>>>> <fo:table-row>
>>>>     <fo:table-cell><fo:block>Inv. Date:</fo:block></fo:table-cell>
>>>>     <fo:table-cell><fo:block>May 4, 2015</fo:block></fo:table-cell>
>>>> </fo:table-row>
>>>>
>>>> <fo:table-row>
>>>>     <fo:table-cell><fo:block>Cust.Nr:</fo:block></fo:table-cell>
>>>>     <fo:table-cell><fo:block>10000</fo:block></fo:table-cell>
>>>> </fo:table-row>
>>>>
>>>>
>>>> <fo:table-row>
>>>>     <fo:table-cell><fo:block>Inv.Nr:</fo:block></fo:table-cell>
>>>>     <fo:table-cell><fo:block>CI3</fo:block></fo:table-cell>
>>>> </fo:table-row>
>>>>     <fo:table-row>
>>>>       <fo:table-cell><fo:block>Descr:</fo:block></fo:table-cell>
>>>>       <fo:table-cell><fo:block>pepps</fo:block></fo:table-cell>
>>>>     </fo:table-row>
>>>>
>>>> <!--fo:table-row>
>>>>     <fo:table-cell><fo:block>Status</fo:block></fo:table-cell>
>>>>     <fo:table-cell><fo:block
>>>> font-weight="bold">In-Process</fo:block></fo:table-cell>
>>>> </fo:table-row-->
>>>> </fo:table-body>
>>>> </fo:table>
>>>> <!-- End Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>>>> -->
>>>>
>>>>                           </fo:table-cell>
>>>>                       </fo:table-row>
>>>>                   </fo:table-body>
>>>>               </fo:table>
>>>>           </fo:static-content>
>>>>
>>>>           <fo:static-content flow-name="xsl-region-after">
>>>>               <fo:block font-size="10pt" text-align="center"
>>>> space-before="10pt">
>>>>                   Page <fo:page-number/> of <fo:page-number-citation
>>>> ref-id="theEnd"/>
>>>>               </fo:block>
>>>>           </fo:static-content>
>>>>
>>>>           <fo:flow flow-name="xsl-region-body">
>>>> <!-- Begin Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>>>> -->
>>>> <fo:table table-layout="fixed" width="100%" space-after="0.3in">
>>>>      <fo:table-column column-width="3.5in"/>
>>>>       <fo:table-body>
>>>>         <fo:table-row >
>>>>           <fo:table-cell>
>>>>                  <fo:block>To: </fo:block>
>>>>           <fo:block>No general/billing address found for
>>>> party:10000</fo:block>
>>>>           </fo:table-cell>
>>>>       </fo:table-row>
>>>>     </fo:table-body>
>>>> </fo:table>
>>>> <!-- End Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>>>> -->
>>>> <!-- Begin Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>>>> -->
>>>>
>>>>
>>>>       <fo:table table-layout="fixed" width="100%" space-before="0.2in">
>>>>       <fo:table-column column-width="20mm"/>
>>>>       <fo:table-column column-width="85mm"/>
>>>>       <fo:table-column column-width="15mm"/>
>>>>       <fo:table-column column-width="25mm"/>
>>>>       <fo:table-column column-width="25mm"/>
>>>>
>>>>       <fo:table-header height="14px">
>>>>         <fo:table-row border-bottom-style="solid"
>>>> border-bottom-width="thin" border-bottom-color="black">
>>>>           <fo:table-cell>
>>>>             <fo:block font-weight="bold">Product</fo:block>
>>>>           </fo:table-cell>
>>>>           <fo:table-cell>
>>>>             <fo:block font-weight="bold">Description</fo:block>
>>>>           </fo:table-cell>
>>>>           <fo:table-cell>
>>>>             <fo:block font-weight="bold" text-align="right">Qty</fo:block>
>>>>           </fo:table-cell>
>>>>           <fo:table-cell>
>>>>             <fo:block font-weight="bold" text-align="right">Unit
>>>> Price</fo:block>
>>>>           </fo:table-cell>
>>>>           <fo:table-cell>
>>>>             <fo:block font-weight="bold"
>>>> text-align="right">Amount</fo:block>
>>>>           </fo:table-cell>
>>>>         </fo:table-row>
>>>>       </fo:table-header>
>>>>
>>>>
>>>>       <fo:table-body font-size="10pt">
>>>>
>>>>           <fo:table-row height="7px">
>>>>               <fo:table-cell
>>>> number-columns-spanned="5"><fo:block></fo:block></fo:table-cell>
>>>>           </fo:table-row>
>>>>
>>>>           <fo:table-row>
>>>>              <fo:table-cell number-columns-spanned="2">
>>>>                 <fo:block/>
>>>>              </fo:table-cell>
>>>>              <fo:table-cell number-columns-spanned="2">
>>>>                 <fo:block font-weight="bold">TOTAL</fo:block>
>>>>              </fo:table-cell>
>>>>              <fo:table-cell text-align="right" border-top-style="solid"
>>>> border-top-width="thin" border-top-color="black">
>>>>                 <fo:block>₹0.00</fo:block>
>>>>              </fo:table-cell>
>>>>           </fo:table-row>
>>>>           <fo:table-row height="7px">
>>>>              <fo:table-cell number-columns-spanned="5">
>>>>                 <fo:block/>
>>>>              </fo:table-cell>
>>>>           </fo:table-row>
>>>>           <fo:table-row height="14px">
>>>>              <fo:table-cell number-columns-spanned="2">
>>>>                 <fo:block/>
>>>>              </fo:table-cell>
>>>>              <fo:table-cell number-columns-spanned="2">
>>>>                 <fo:block>Total excl. tax</fo:block>
>>>>              </fo:table-cell>
>>>>              <fo:table-cell text-align="right" border-top-style="solid"
>>>> border-top-width="thin" border-top-color="black">
>>>>                 <fo:block>
>>>> ₹0.00              </fo:block>
>>>>              </fo:table-cell>
>>>>           </fo:table-row>
>>>>       </fo:table-body>
>>>>    </fo:table>
>>>>
>>>>
>>>>
>>>>    <fo:block></fo:block>
>>>> <!-- End Template
>>>>
>>>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>>>> -->
>>>>
>>>>               <fo:block id="theEnd"/>
>>>>           </fo:flow>
>>>>       </fo:page-sequence>
>>>> </fo:root>
>>>> <!-- End Template
>>>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>>>>
>>>>


Re: Cannot print/generate pdfs with INR currency

Posted by Meeka Schenzski <mo...@gmail.com>.
Hi Jacques,

I applied the changes locally but am still getting an error.

[java] 2015-05-08 10:36:21,376 (http-bio-0.0.0.0-8443-exec-6)
[LoggingEventListener.java:80 :WARN ] Font "NotoSans,normal,700" not found.
Substituting with "any,normal,700".
     [java] 2015-05-08 10:36:21,380 (http-bio-0.0.0.0-8443-exec-6)
[ScreenFopViewHandler.java:121:ERROR] Unable to transform FO file:
org.apache.fop.apps.FOPException: -1

I copied the fonts into framework/resources/fonts/NotoSans and also
installed them onto my system.

Any idea what is happening? Do you need any more information from me?
Please let me know and I will get back to you.

Thank you again for your time.
M

On Thu, May 7, 2015 at 1:29 PM, Meeka Schenzski <
mozilla.secureworks@gmail.com> wrote:

> Super! Thank you so much for the quick response. I will apply the patch
> and let you know how it goes.
>
> Regards,
> M
>
> On Thu, May 7, 2015 at 12:22 PM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> You are in luck, I improved OFBiz to get this working, see
>> https://issues.apache.org/jira/browse/OFBIZ-5917
>>
>> Now you just need to apply those change to your local version
>>
>> Jacques
>>
>>
>> Le 07/05/2015 07:16, Meeka Schenzski a écrit :
>>
>>> Hello,
>>>
>>> Not sure what Im missing here and would love some help or guidance.
>>>
>>> Im running ofbiz-12.04.05 and I've changed the default currency from USD
>>> to
>>> INR. Ive created a new Invoice but when I try to generate a .pdf it is
>>> failing with the below error.
>>>
>>> Please help.
>>>
>>> The Following Errors Occurred: Unable to transform FO file:
>>> org.apache.fop.apps.FOPException: -1
>>> java.lang.ArrayIndexOutOfBoundsException: -1
>>>
>>> Logs: ==> error.log <== 2015-05-06 10:16:33,197
>>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>>
>>> ==> fop.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>>> found. Substituting with "ZapfDingbats,normal,400".
>>>
>>> ==> ofbiz.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>>> found. Substituting with "ZapfDingbats,normal,400". 2015-05-06
>>> 10:16:33,197
>>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <!-- Begin Template
>>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>>      <fo:layout-master-set>
>>>          <fo:simple-page-master master-name="main-page"
>>>                page-width="8.5in" page-height="11in"
>>>                margin-top="0.4in" margin-bottom="0.4in"
>>>                margin-left="0.6in" margin-right="0.4in">
>>>              <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/>
>>>              <fo:region-before extent="1.2in"/>
>>>              <fo:region-after extent="0.4in"/>
>>>          </fo:simple-page-master>
>>>          <fo:simple-page-master master-name="main-page-landscape"
>>>                page-width="11in" page-height="8.5in"
>>>                margin-top="0.4in" margin-bottom="0.4in"
>>>                margin-left="0.6in" margin-right="0.4in">
>>>              <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/>
>>>              <fo:region-before extent="1.2in"/>
>>>              <fo:region-after extent="0.4in"/>
>>>          </fo:simple-page-master>
>>>      </fo:layout-master-set>
>>>
>>>      <fo:page-sequence master-reference="main-page">
>>>
>>>          <fo:static-content flow-name="xsl-region-before">
>>>              <fo:table table-layout="fixed" width="100%">
>>>                  <fo:table-column column-number="1"
>>> column-width="proportional-column-width(50)"/>
>>>                  <fo:table-column column-number="2"
>>> column-width="proportional-column-width(50)"/>
>>>                  <fo:table-body>
>>>                      <fo:table-row>
>>>                          <fo:table-cell>
>>> <!-- Begin Template
>>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>>
>>> <fo:block text-align="left">
>>>      <fo:external-graphic src="/images/ofbiz_logo.gif"
>>> overflow="hidden" height="40px" content-height="scale-to-fit"
>>> content-width="2.00in"/>
>>> </fo:block>
>>>
>>> <fo:block font-size="8pt">
>>>      <fo:block>Global Spice Trading Partners</fo:block>
>>>
>>>              <!-- Begin Template
>>>
>>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>>> -->
>>>    <fo:block>2003 Open Blvd</fo:block>
>>>
>>>    <fo:block>Open City, CA 999999</fo:block>
>>>      <fo:block>
>>>        United States
>>>      </fo:block>
>>> <!-- End Template
>>>
>>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>>> -->
>>>
>>>
>>>      <fo:list-block provisional-distance-between-starts=".5in">
>>>          <fo:list-item>
>>>              <fo:list-item-label>
>>>                  <fo:block>Tax ID:</fo:block>
>>>              </fo:list-item-label>
>>>              <fo:list-item-body start-indent="body-start()">
>>>                  <fo:block>12-3456789</fo:block>
>>>              </fo:list-item-body>
>>>          </fo:list-item>
>>>          <fo:list-item>
>>>              <fo:list-item-label>
>>>                  <fo:block>Email:</fo:block>
>>>              </fo:list-item-label>
>>>              <fo:list-item-body start-indent="body-start()">
>>>                  <fo:block>ofbiztest@example.com</fo:block>
>>>              </fo:list-item-body>
>>>          </fo:list-item>
>>>      </fo:list-block>
>>> </fo:block>
>>> <!-- End Template
>>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>>
>>>                          </fo:table-cell>
>>>                          <fo:table-cell>
>>> <!-- Begin Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>>> -->
>>> <fo:table table-layout="fixed" width="100%">
>>> <fo:table-column column-width="1in"/>
>>> <fo:table-column column-width="2.5in"/>
>>> <fo:table-body>
>>> <fo:table-row>
>>>    <fo:table-cell>
>>>       <fo:block number-columns-spanned="2" font-weight="bold">Sales
>>> Invoice</fo:block>
>>>    </fo:table-cell>
>>> </fo:table-row>
>>>
>>> <fo:table-row>
>>>    <fo:table-cell><fo:block>Inv. Date:</fo:block></fo:table-cell>
>>>    <fo:table-cell><fo:block>May 4, 2015</fo:block></fo:table-cell>
>>> </fo:table-row>
>>>
>>> <fo:table-row>
>>>    <fo:table-cell><fo:block>Cust.Nr:</fo:block></fo:table-cell>
>>>    <fo:table-cell><fo:block>10000</fo:block></fo:table-cell>
>>> </fo:table-row>
>>>
>>>
>>> <fo:table-row>
>>>    <fo:table-cell><fo:block>Inv.Nr:</fo:block></fo:table-cell>
>>>    <fo:table-cell><fo:block>CI3</fo:block></fo:table-cell>
>>> </fo:table-row>
>>>    <fo:table-row>
>>>      <fo:table-cell><fo:block>Descr:</fo:block></fo:table-cell>
>>>      <fo:table-cell><fo:block>pepps</fo:block></fo:table-cell>
>>>    </fo:table-row>
>>>
>>> <!--fo:table-row>
>>>    <fo:table-cell><fo:block>Status</fo:block></fo:table-cell>
>>>    <fo:table-cell><fo:block
>>> font-weight="bold">In-Process</fo:block></fo:table-cell>
>>> </fo:table-row-->
>>> </fo:table-body>
>>> </fo:table>
>>> <!-- End Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>>> -->
>>>
>>>                          </fo:table-cell>
>>>                      </fo:table-row>
>>>                  </fo:table-body>
>>>              </fo:table>
>>>          </fo:static-content>
>>>
>>>          <fo:static-content flow-name="xsl-region-after">
>>>              <fo:block font-size="10pt" text-align="center"
>>> space-before="10pt">
>>>                  Page <fo:page-number/> of <fo:page-number-citation
>>> ref-id="theEnd"/>
>>>              </fo:block>
>>>          </fo:static-content>
>>>
>>>          <fo:flow flow-name="xsl-region-body">
>>> <!-- Begin Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>>> -->
>>> <fo:table table-layout="fixed" width="100%" space-after="0.3in">
>>>     <fo:table-column column-width="3.5in"/>
>>>      <fo:table-body>
>>>        <fo:table-row >
>>>          <fo:table-cell>
>>>                 <fo:block>To: </fo:block>
>>>          <fo:block>No general/billing address found for
>>> party:10000</fo:block>
>>>          </fo:table-cell>
>>>      </fo:table-row>
>>>    </fo:table-body>
>>> </fo:table>
>>> <!-- End Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>>> -->
>>> <!-- Begin Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>>> -->
>>>
>>>
>>>      <fo:table table-layout="fixed" width="100%" space-before="0.2in">
>>>      <fo:table-column column-width="20mm"/>
>>>      <fo:table-column column-width="85mm"/>
>>>      <fo:table-column column-width="15mm"/>
>>>      <fo:table-column column-width="25mm"/>
>>>      <fo:table-column column-width="25mm"/>
>>>
>>>      <fo:table-header height="14px">
>>>        <fo:table-row border-bottom-style="solid"
>>> border-bottom-width="thin" border-bottom-color="black">
>>>          <fo:table-cell>
>>>            <fo:block font-weight="bold">Product</fo:block>
>>>          </fo:table-cell>
>>>          <fo:table-cell>
>>>            <fo:block font-weight="bold">Description</fo:block>
>>>          </fo:table-cell>
>>>          <fo:table-cell>
>>>            <fo:block font-weight="bold" text-align="right">Qty</fo:block>
>>>          </fo:table-cell>
>>>          <fo:table-cell>
>>>            <fo:block font-weight="bold" text-align="right">Unit
>>> Price</fo:block>
>>>          </fo:table-cell>
>>>          <fo:table-cell>
>>>            <fo:block font-weight="bold"
>>> text-align="right">Amount</fo:block>
>>>          </fo:table-cell>
>>>        </fo:table-row>
>>>      </fo:table-header>
>>>
>>>
>>>      <fo:table-body font-size="10pt">
>>>
>>>          <fo:table-row height="7px">
>>>              <fo:table-cell
>>> number-columns-spanned="5"><fo:block></fo:block></fo:table-cell>
>>>          </fo:table-row>
>>>
>>>          <fo:table-row>
>>>             <fo:table-cell number-columns-spanned="2">
>>>                <fo:block/>
>>>             </fo:table-cell>
>>>             <fo:table-cell number-columns-spanned="2">
>>>                <fo:block font-weight="bold">TOTAL</fo:block>
>>>             </fo:table-cell>
>>>             <fo:table-cell text-align="right" border-top-style="solid"
>>> border-top-width="thin" border-top-color="black">
>>>                <fo:block>₹0.00</fo:block>
>>>             </fo:table-cell>
>>>          </fo:table-row>
>>>          <fo:table-row height="7px">
>>>             <fo:table-cell number-columns-spanned="5">
>>>                <fo:block/>
>>>             </fo:table-cell>
>>>          </fo:table-row>
>>>          <fo:table-row height="14px">
>>>             <fo:table-cell number-columns-spanned="2">
>>>                <fo:block/>
>>>             </fo:table-cell>
>>>             <fo:table-cell number-columns-spanned="2">
>>>                <fo:block>Total excl. tax</fo:block>
>>>             </fo:table-cell>
>>>             <fo:table-cell text-align="right" border-top-style="solid"
>>> border-top-width="thin" border-top-color="black">
>>>                <fo:block>
>>> ₹0.00              </fo:block>
>>>             </fo:table-cell>
>>>          </fo:table-row>
>>>      </fo:table-body>
>>>   </fo:table>
>>>
>>>
>>>
>>>   <fo:block></fo:block>
>>> <!-- End Template
>>>
>>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>>> -->
>>>
>>>              <fo:block id="theEnd"/>
>>>          </fo:flow>
>>>      </fo:page-sequence>
>>> </fo:root>
>>> <!-- End Template
>>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>>>
>>>
>

Re: Cannot print/generate pdfs with INR currency

Posted by Meeka Schenzski <mo...@gmail.com>.
Super! Thank you so much for the quick response. I will apply the patch and
let you know how it goes.

Regards,
M

On Thu, May 7, 2015 at 12:22 PM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> You are in luck, I improved OFBiz to get this working, see
> https://issues.apache.org/jira/browse/OFBIZ-5917
>
> Now you just need to apply those change to your local version
>
> Jacques
>
>
> Le 07/05/2015 07:16, Meeka Schenzski a écrit :
>
>> Hello,
>>
>> Not sure what Im missing here and would love some help or guidance.
>>
>> Im running ofbiz-12.04.05 and I've changed the default currency from USD
>> to
>> INR. Ive created a new Invoice but when I try to generate a .pdf it is
>> failing with the below error.
>>
>> Please help.
>>
>> The Following Errors Occurred: Unable to transform FO file:
>> org.apache.fop.apps.FOPException: -1
>> java.lang.ArrayIndexOutOfBoundsException: -1
>>
>> Logs: ==> error.log <== 2015-05-06 10:16:33,197
>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>
>> ==> fop.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>> found. Substituting with "ZapfDingbats,normal,400".
>>
>> ==> ofbiz.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
>> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
>> found. Substituting with "ZapfDingbats,normal,400". 2015-05-06
>> 10:16:33,197
>> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
>> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
>> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!-- Begin Template
>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>>      <fo:layout-master-set>
>>          <fo:simple-page-master master-name="main-page"
>>                page-width="8.5in" page-height="11in"
>>                margin-top="0.4in" margin-bottom="0.4in"
>>                margin-left="0.6in" margin-right="0.4in">
>>              <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/>
>>              <fo:region-before extent="1.2in"/>
>>              <fo:region-after extent="0.4in"/>
>>          </fo:simple-page-master>
>>          <fo:simple-page-master master-name="main-page-landscape"
>>                page-width="11in" page-height="8.5in"
>>                margin-top="0.4in" margin-bottom="0.4in"
>>                margin-left="0.6in" margin-right="0.4in">
>>              <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/>
>>              <fo:region-before extent="1.2in"/>
>>              <fo:region-after extent="0.4in"/>
>>          </fo:simple-page-master>
>>      </fo:layout-master-set>
>>
>>      <fo:page-sequence master-reference="main-page">
>>
>>          <fo:static-content flow-name="xsl-region-before">
>>              <fo:table table-layout="fixed" width="100%">
>>                  <fo:table-column column-number="1"
>> column-width="proportional-column-width(50)"/>
>>                  <fo:table-column column-number="2"
>> column-width="proportional-column-width(50)"/>
>>                  <fo:table-body>
>>                      <fo:table-row>
>>                          <fo:table-cell>
>> <!-- Begin Template
>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>
>> <fo:block text-align="left">
>>      <fo:external-graphic src="/images/ofbiz_logo.gif"
>> overflow="hidden" height="40px" content-height="scale-to-fit"
>> content-width="2.00in"/>
>> </fo:block>
>>
>> <fo:block font-size="8pt">
>>      <fo:block>Global Spice Trading Partners</fo:block>
>>
>>              <!-- Begin Template
>>
>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>> -->
>>    <fo:block>2003 Open Blvd</fo:block>
>>
>>    <fo:block>Open City, CA 999999</fo:block>
>>      <fo:block>
>>        United States
>>      </fo:block>
>> <!-- End Template
>>
>> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
>> -->
>>
>>
>>      <fo:list-block provisional-distance-between-starts=".5in">
>>          <fo:list-item>
>>              <fo:list-item-label>
>>                  <fo:block>Tax ID:</fo:block>
>>              </fo:list-item-label>
>>              <fo:list-item-body start-indent="body-start()">
>>                  <fo:block>12-3456789</fo:block>
>>              </fo:list-item-body>
>>          </fo:list-item>
>>          <fo:list-item>
>>              <fo:list-item-label>
>>                  <fo:block>Email:</fo:block>
>>              </fo:list-item-label>
>>              <fo:list-item-body start-indent="body-start()">
>>                  <fo:block>ofbiztest@example.com</fo:block>
>>              </fo:list-item-body>
>>          </fo:list-item>
>>      </fo:list-block>
>> </fo:block>
>> <!-- End Template
>> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>>
>>                          </fo:table-cell>
>>                          <fo:table-cell>
>> <!-- Begin Template
>>
>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>> -->
>> <fo:table table-layout="fixed" width="100%">
>> <fo:table-column column-width="1in"/>
>> <fo:table-column column-width="2.5in"/>
>> <fo:table-body>
>> <fo:table-row>
>>    <fo:table-cell>
>>       <fo:block number-columns-spanned="2" font-weight="bold">Sales
>> Invoice</fo:block>
>>    </fo:table-cell>
>> </fo:table-row>
>>
>> <fo:table-row>
>>    <fo:table-cell><fo:block>Inv. Date:</fo:block></fo:table-cell>
>>    <fo:table-cell><fo:block>May 4, 2015</fo:block></fo:table-cell>
>> </fo:table-row>
>>
>> <fo:table-row>
>>    <fo:table-cell><fo:block>Cust.Nr:</fo:block></fo:table-cell>
>>    <fo:table-cell><fo:block>10000</fo:block></fo:table-cell>
>> </fo:table-row>
>>
>>
>> <fo:table-row>
>>    <fo:table-cell><fo:block>Inv.Nr:</fo:block></fo:table-cell>
>>    <fo:table-cell><fo:block>CI3</fo:block></fo:table-cell>
>> </fo:table-row>
>>    <fo:table-row>
>>      <fo:table-cell><fo:block>Descr:</fo:block></fo:table-cell>
>>      <fo:table-cell><fo:block>pepps</fo:block></fo:table-cell>
>>    </fo:table-row>
>>
>> <!--fo:table-row>
>>    <fo:table-cell><fo:block>Status</fo:block></fo:table-cell>
>>    <fo:table-cell><fo:block
>> font-weight="bold">In-Process</fo:block></fo:table-cell>
>> </fo:table-row-->
>> </fo:table-body>
>> </fo:table>
>> <!-- End Template
>>
>> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
>> -->
>>
>>                          </fo:table-cell>
>>                      </fo:table-row>
>>                  </fo:table-body>
>>              </fo:table>
>>          </fo:static-content>
>>
>>          <fo:static-content flow-name="xsl-region-after">
>>              <fo:block font-size="10pt" text-align="center"
>> space-before="10pt">
>>                  Page <fo:page-number/> of <fo:page-number-citation
>> ref-id="theEnd"/>
>>              </fo:block>
>>          </fo:static-content>
>>
>>          <fo:flow flow-name="xsl-region-body">
>> <!-- Begin Template
>>
>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>> -->
>> <fo:table table-layout="fixed" width="100%" space-after="0.3in">
>>     <fo:table-column column-width="3.5in"/>
>>      <fo:table-body>
>>        <fo:table-row >
>>          <fo:table-cell>
>>                 <fo:block>To: </fo:block>
>>          <fo:block>No general/billing address found for
>> party:10000</fo:block>
>>          </fo:table-cell>
>>      </fo:table-row>
>>    </fo:table-body>
>> </fo:table>
>> <!-- End Template
>>
>> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
>> -->
>> <!-- Begin Template
>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>> -->
>>
>>
>>      <fo:table table-layout="fixed" width="100%" space-before="0.2in">
>>      <fo:table-column column-width="20mm"/>
>>      <fo:table-column column-width="85mm"/>
>>      <fo:table-column column-width="15mm"/>
>>      <fo:table-column column-width="25mm"/>
>>      <fo:table-column column-width="25mm"/>
>>
>>      <fo:table-header height="14px">
>>        <fo:table-row border-bottom-style="solid"
>> border-bottom-width="thin" border-bottom-color="black">
>>          <fo:table-cell>
>>            <fo:block font-weight="bold">Product</fo:block>
>>          </fo:table-cell>
>>          <fo:table-cell>
>>            <fo:block font-weight="bold">Description</fo:block>
>>          </fo:table-cell>
>>          <fo:table-cell>
>>            <fo:block font-weight="bold" text-align="right">Qty</fo:block>
>>          </fo:table-cell>
>>          <fo:table-cell>
>>            <fo:block font-weight="bold" text-align="right">Unit
>> Price</fo:block>
>>          </fo:table-cell>
>>          <fo:table-cell>
>>            <fo:block font-weight="bold"
>> text-align="right">Amount</fo:block>
>>          </fo:table-cell>
>>        </fo:table-row>
>>      </fo:table-header>
>>
>>
>>      <fo:table-body font-size="10pt">
>>
>>          <fo:table-row height="7px">
>>              <fo:table-cell
>> number-columns-spanned="5"><fo:block></fo:block></fo:table-cell>
>>          </fo:table-row>
>>
>>          <fo:table-row>
>>             <fo:table-cell number-columns-spanned="2">
>>                <fo:block/>
>>             </fo:table-cell>
>>             <fo:table-cell number-columns-spanned="2">
>>                <fo:block font-weight="bold">TOTAL</fo:block>
>>             </fo:table-cell>
>>             <fo:table-cell text-align="right" border-top-style="solid"
>> border-top-width="thin" border-top-color="black">
>>                <fo:block>₹0.00</fo:block>
>>             </fo:table-cell>
>>          </fo:table-row>
>>          <fo:table-row height="7px">
>>             <fo:table-cell number-columns-spanned="5">
>>                <fo:block/>
>>             </fo:table-cell>
>>          </fo:table-row>
>>          <fo:table-row height="14px">
>>             <fo:table-cell number-columns-spanned="2">
>>                <fo:block/>
>>             </fo:table-cell>
>>             <fo:table-cell number-columns-spanned="2">
>>                <fo:block>Total excl. tax</fo:block>
>>             </fo:table-cell>
>>             <fo:table-cell text-align="right" border-top-style="solid"
>> border-top-width="thin" border-top-color="black">
>>                <fo:block>
>> ₹0.00              </fo:block>
>>             </fo:table-cell>
>>          </fo:table-row>
>>      </fo:table-body>
>>   </fo:table>
>>
>>
>>
>>   <fo:block></fo:block>
>> <!-- End Template
>> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
>> -->
>>
>>              <fo:block id="theEnd"/>
>>          </fo:flow>
>>      </fo:page-sequence>
>> </fo:root>
>> <!-- End Template
>> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>>
>>

Re: Cannot print/generate pdfs with INR currency

Posted by Jacques Le Roux <ja...@les7arts.com>.
You are in luck, I improved OFBiz to get this working, see https://issues.apache.org/jira/browse/OFBIZ-5917

Now you just need to apply those change to your local version

Jacques

Le 07/05/2015 07:16, Meeka Schenzski a écrit :
> Hello,
>
> Not sure what Im missing here and would love some help or guidance.
>
> Im running ofbiz-12.04.05 and I've changed the default currency from USD to
> INR. Ive created a new Invoice but when I try to generate a .pdf it is
> failing with the below error.
>
> Please help.
>
> The Following Errors Occurred: Unable to transform FO file:
> org.apache.fop.apps.FOPException: -1
> java.lang.ArrayIndexOutOfBoundsException: -1
>
> Logs: ==> error.log <== 2015-05-06 10:16:33,197
> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>
> ==> fop.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
> found. Substituting with "ZapfDingbats,normal,400".
>
> ==> ofbiz.log <== 2015-05-06 10:16:33,194 (http-bio-0.0.0.0-8443-exec-79)
> [LoggingEventListener.java:80 :WARN ] Font "ZapfDingbats,normal,700" not
> found. Substituting with "ZapfDingbats,normal,400". 2015-05-06 10:16:33,197
> (http-bio-0.0.0.0-8443-exec-79) [ScreenFopViewHandler.java:121:ERROR]
> Unable to transform FO file: org.apache.fop.apps.FOPException: -1
> java.lang.ArrayIndexOutOfBoundsException: -1; Screen XSL:FO text was:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- Begin Template
> component://common/webcommon/includes/reportTemplate.fo.ftl -->
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>      <fo:layout-master-set>
>          <fo:simple-page-master master-name="main-page"
>                page-width="8.5in" page-height="11in"
>                margin-top="0.4in" margin-bottom="0.4in"
>                margin-left="0.6in" margin-right="0.4in">
>              <fo:region-body margin-top="1.5in" margin-bottom="0.4in"/>
>              <fo:region-before extent="1.2in"/>
>              <fo:region-after extent="0.4in"/>
>          </fo:simple-page-master>
>          <fo:simple-page-master master-name="main-page-landscape"
>                page-width="11in" page-height="8.5in"
>                margin-top="0.4in" margin-bottom="0.4in"
>                margin-left="0.6in" margin-right="0.4in">
>              <fo:region-body margin-top="1.2in" margin-bottom="0.4in"/>
>              <fo:region-before extent="1.2in"/>
>              <fo:region-after extent="0.4in"/>
>          </fo:simple-page-master>
>      </fo:layout-master-set>
>
>      <fo:page-sequence master-reference="main-page">
>
>          <fo:static-content flow-name="xsl-region-before">
>              <fo:table table-layout="fixed" width="100%">
>                  <fo:table-column column-number="1"
> column-width="proportional-column-width(50)"/>
>                  <fo:table-column column-number="2"
> column-width="proportional-column-width(50)"/>
>                  <fo:table-body>
>                      <fo:table-row>
>                          <fo:table-cell>
> <!-- Begin Template
> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>
> <fo:block text-align="left">
>      <fo:external-graphic src="/images/ofbiz_logo.gif"
> overflow="hidden" height="40px" content-height="scale-to-fit"
> content-width="2.00in"/>
> </fo:block>
>
> <fo:block font-size="8pt">
>      <fo:block>Global Spice Trading Partners</fo:block>
>
>              <!-- Begin Template
> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
> -->
>    <fo:block>2003 Open Blvd</fo:block>
>
>    <fo:block>Open City, CA 999999</fo:block>
>      <fo:block>
>        United States
>      </fo:block>
> <!-- End Template
> component://party/webapp/partymgr/party/contactmechtemplates/PostalAddress_USA.fo.ftl
> -->
>
>
>      <fo:list-block provisional-distance-between-starts=".5in">
>          <fo:list-item>
>              <fo:list-item-label>
>                  <fo:block>Tax ID:</fo:block>
>              </fo:list-item-label>
>              <fo:list-item-body start-indent="body-start()">
>                  <fo:block>12-3456789</fo:block>
>              </fo:list-item-body>
>          </fo:list-item>
>          <fo:list-item>
>              <fo:list-item-label>
>                  <fo:block>Email:</fo:block>
>              </fo:list-item-label>
>              <fo:list-item-body start-indent="body-start()">
>                  <fo:block>ofbiztest@example.com</fo:block>
>              </fo:list-item-body>
>          </fo:list-item>
>      </fo:list-block>
> </fo:block>
> <!-- End Template
> component://order/webapp/ordermgr/order/companyHeader.fo.ftl -->
>
>                          </fo:table-cell>
>                          <fo:table-cell>
> <!-- Begin Template
> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
> -->
> <fo:table table-layout="fixed" width="100%">
> <fo:table-column column-width="1in"/>
> <fo:table-column column-width="2.5in"/>
> <fo:table-body>
> <fo:table-row>
>    <fo:table-cell>
>       <fo:block number-columns-spanned="2" font-weight="bold">Sales
> Invoice</fo:block>
>    </fo:table-cell>
> </fo:table-row>
>
> <fo:table-row>
>    <fo:table-cell><fo:block>Inv. Date:</fo:block></fo:table-cell>
>    <fo:table-cell><fo:block>May 4, 2015</fo:block></fo:table-cell>
> </fo:table-row>
>
> <fo:table-row>
>    <fo:table-cell><fo:block>Cust.Nr:</fo:block></fo:table-cell>
>    <fo:table-cell><fo:block>10000</fo:block></fo:table-cell>
> </fo:table-row>
>
>
> <fo:table-row>
>    <fo:table-cell><fo:block>Inv.Nr:</fo:block></fo:table-cell>
>    <fo:table-cell><fo:block>CI3</fo:block></fo:table-cell>
> </fo:table-row>
>    <fo:table-row>
>      <fo:table-cell><fo:block>Descr:</fo:block></fo:table-cell>
>      <fo:table-cell><fo:block>pepps</fo:block></fo:table-cell>
>    </fo:table-row>
>
> <!--fo:table-row>
>    <fo:table-cell><fo:block>Status</fo:block></fo:table-cell>
>    <fo:table-cell><fo:block
> font-weight="bold">In-Process</fo:block></fo:table-cell>
> </fo:table-row-->
> </fo:table-body>
> </fo:table>
> <!-- End Template
> component://accounting/webapp/accounting/invoice/invoiceReportHeaderInfo.fo.ftl
> -->
>
>                          </fo:table-cell>
>                      </fo:table-row>
>                  </fo:table-body>
>              </fo:table>
>          </fo:static-content>
>
>          <fo:static-content flow-name="xsl-region-after">
>              <fo:block font-size="10pt" text-align="center" space-before="10pt">
>                  Page <fo:page-number/> of <fo:page-number-citation
> ref-id="theEnd"/>
>              </fo:block>
>          </fo:static-content>
>
>          <fo:flow flow-name="xsl-region-body">
> <!-- Begin Template
> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
> -->
> <fo:table table-layout="fixed" width="100%" space-after="0.3in">
>     <fo:table-column column-width="3.5in"/>
>      <fo:table-body>
>        <fo:table-row >
>          <fo:table-cell>
>                 <fo:block>To: </fo:block>
>          <fo:block>No general/billing address found for party:10000</fo:block>
>          </fo:table-cell>
>      </fo:table-row>
>    </fo:table-body>
> </fo:table>
> <!-- End Template
> component://accounting/webapp/accounting/invoice/invoiceReportContactMechs.fo.ftl
> -->
> <!-- Begin Template
> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
> -->
>
>
>      <fo:table table-layout="fixed" width="100%" space-before="0.2in">
>      <fo:table-column column-width="20mm"/>
>      <fo:table-column column-width="85mm"/>
>      <fo:table-column column-width="15mm"/>
>      <fo:table-column column-width="25mm"/>
>      <fo:table-column column-width="25mm"/>
>
>      <fo:table-header height="14px">
>        <fo:table-row border-bottom-style="solid"
> border-bottom-width="thin" border-bottom-color="black">
>          <fo:table-cell>
>            <fo:block font-weight="bold">Product</fo:block>
>          </fo:table-cell>
>          <fo:table-cell>
>            <fo:block font-weight="bold">Description</fo:block>
>          </fo:table-cell>
>          <fo:table-cell>
>            <fo:block font-weight="bold" text-align="right">Qty</fo:block>
>          </fo:table-cell>
>          <fo:table-cell>
>            <fo:block font-weight="bold" text-align="right">Unit Price</fo:block>
>          </fo:table-cell>
>          <fo:table-cell>
>            <fo:block font-weight="bold" text-align="right">Amount</fo:block>
>          </fo:table-cell>
>        </fo:table-row>
>      </fo:table-header>
>
>
>      <fo:table-body font-size="10pt">
>
>          <fo:table-row height="7px">
>              <fo:table-cell
> number-columns-spanned="5"><fo:block></fo:block></fo:table-cell>
>          </fo:table-row>
>
>          <fo:table-row>
>             <fo:table-cell number-columns-spanned="2">
>                <fo:block/>
>             </fo:table-cell>
>             <fo:table-cell number-columns-spanned="2">
>                <fo:block font-weight="bold">TOTAL</fo:block>
>             </fo:table-cell>
>             <fo:table-cell text-align="right" border-top-style="solid"
> border-top-width="thin" border-top-color="black">
>                <fo:block>₹0.00</fo:block>
>             </fo:table-cell>
>          </fo:table-row>
>          <fo:table-row height="7px">
>             <fo:table-cell number-columns-spanned="5">
>                <fo:block/>
>             </fo:table-cell>
>          </fo:table-row>
>          <fo:table-row height="14px">
>             <fo:table-cell number-columns-spanned="2">
>                <fo:block/>
>             </fo:table-cell>
>             <fo:table-cell number-columns-spanned="2">
>                <fo:block>Total excl. tax</fo:block>
>             </fo:table-cell>
>             <fo:table-cell text-align="right" border-top-style="solid"
> border-top-width="thin" border-top-color="black">
>                <fo:block>
> ₹0.00              </fo:block>
>             </fo:table-cell>
>          </fo:table-row>
>      </fo:table-body>
>   </fo:table>
>
>
>
>   <fo:block></fo:block>
> <!-- End Template
> component://accounting/webapp/accounting/invoice/invoiceReportItems.fo.ftl
> -->
>
>              <fo:block id="theEnd"/>
>          </fo:flow>
>      </fo:page-sequence>
> </fo:root>
> <!-- End Template
> component://common/webcommon/includes/reportTemplate.fo.ftl -->
>