Re: Fw: Could not initialize class com.xmlmind.xmledit.cssparser.ParseUtil on live Linux

Rajesh Kumar Chaudhary <[email protected]> Wed, 5 Apr 2017 15:20:52 +0000
Newsgroups gmane.text.xml.xfc.general
Message-ID <[email protected]>
Hi Hussein ,

Thanks for quick reply 

I gone through  as per as your instruction and found that background image   are coming with docx file 
but not 100 percent it's showing same image whatever we are setting in xsl file
same code working fine pdf
see example attached file there pdf is correct but word file not
is there any special  attribute for docx file


Rajesh Chaudhary | PHP Team Lead
Email: [email protected] |  Skype: ve.rajeshkumar


________________________________


India: (+91) 120 6628591 | USA: (+1) 877 697 8006 | Canada: (+1) 416 915 8941
UK: (+44) 203 478 5941 | Australia : (+61) 280 733 418



________________________________________
From: Hussein Shafie <[email protected]>
Sent: 03 April 2017 21:47
To: Rajesh Kumar Chaudhary
Cc: [email protected]; Tim Butterworth
Subject: Re: [XFC] Fw: Could not initialize class com.xmlmind.xmledit.cssparser.ParseUtil on live Linux

On 04/03/2017 05:07 PM, Rajesh Kumar Chaudhary wrote:
>
> I would like to know how to set background  images in docx file using  xmlmind.  We have created the  xsl fo template  and it is working fine for pdf  file creation  so we want to same design in docx file also
> we have try to do it, but always  showing white background color in ms word file(docx)
> Please help me,  how we can do it, I  have attached  three  sample file
> 1) xsl template
> 2)generated pdf file
> 3) generated docx file
>

As explained in "XMLmind XSL-FO Converter support policy"
(http://www.xmlmind.com/foconverter/support.html), we need a XSL-FO
(.fo) file to reproduce the problem here at XMLmind. You sent us a XSLT
(.xsl) file, not a XSL-FO (.fo) file.

However the  XSLT (.xsl) file you sent us is just a wrapper around a
self-contained XSL-FO <fo:root> (cannot guess why you do that).
Therefore it was simple to extract the <fo:root> element we need.

Running:
---
fo2docx SerendipityQuotation.fo SerendipityQuotation.docx
---

reports the following warnings:
---
warning: bad property value
background-image="url('https://webstage1.eecsoftwarecom/images/bg.jpg');"
(file:/home/hussein/tmp/SerendipityQuotation.fo, line #5, olumn #216)

warning: failed to load image
"https://darwin.eecsoftware.com/clientsites/serendpity/images/sign.png":
java.lang.RuntimeException: Could not generate DH
keypair(file:/home/hussein/tmp/SerendipityQuotation.fo, line #18, column
#202)
---

that's why it does not work.

If you remove the ';' at the end of "url(...);", first warning is not
reported anymore.

If you use a recent Oracle Java 1.8 (I used at first an old Java 1.6),
second warning is not reported anymore.

After doing that, it works just fine. See attached DOCX file.



--> In summary, please pay attention to the warnings reported by XMLmind
XSL-FO Converter.
05-04-2017-Serendipity Quotation_1491404389.docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document, 742.1 KB) - not displayed