Thanks. I downloaded the personal version of the converter. After looking at 
your user guide java examples, I still can't figure out how I would set the 
properties and pass an xsl-fo file to the converter from a PHP program.

The java examples appear to be importing files (classes?) that weren't 
downloaded.

In our (PHP) web application, the user creates a quote for a customer then 
exports it to PDF or Word, for presentation to the customer. We currently have 
PHP programs to do both. The make_pdf program creates an xsl-fo file and passes 
it to FOP. The make_word program is impenetrable, because someone has dissected 
an encoded .doc file, included it in the PHP module, and dynamically 
substitutes real data for %placeholders%, then outputs the modified .doc file. 
That works fine, unless you have to change something that is not in a place 
holder!

Your converter looks like a good solution, but I would have to be able to 
invoke it from a PHP module.

-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: Wednesday, November 03, 2010 5:17 AM
To: Frank Rogoyski
Cc: [email protected]
Subject: Re: [XFC] XSL-FO Converter question

On 11/02/2010 08:28 PM, Frank Rogoyski wrote:
> I have a PHP program that produces an XSL-FO file, then invokes FOP to 
> produce a PDF output file.
> 
> Ideally, I would like to also produce an RTF (or doc) file from the 
> same XSL-FO file.
> 
> The document is typically 1 or 2 pages, contains an image header and 
> footer, and has simple tables containing the data.
> 
> Can your converter be used in this manner?

Sure.

Of interest: XMLmind XSL Server, which integrates both FOP and XMLmind XSL-FO 
Converter in a production quality server. That is, you don't need to invoke a 
command-line or embed a JVM in PHP. More info:
http://www.xmlmind.com/foconverter/xsl_server.html



> 
> I have attached an example of a file used as input to FOP.
> 

*FOP* 0.95 reports this (easy to fix) error and refuses to convert your
file:

---
org.apache.fop.fo.ValidationException:
file:/home/hussein/tmp/2a98eafa-37fc-102e-b465-ebfe3614c28f.xml:5:72:
Error(5/72): For fo:simple-page-master, fo:region-body must be declared before 
fo:region-before.
---

Please find attached to this email a PDF generated using RenderX XEP (which 
reports the same error, but does not bail out) and the RTF generated using 
XMLmind XSL-FO Converter.

The RTF looks decent when opened in MS-Word.

You can further improve the look of the RTF by slightly modifying the way you 
generate the XSL-FO. Please understand that you don't need to generate a 
specific XSL-FO for our product. Simply, you have to find which is the most 
*interoperable* XSL-FO. (Generally, it's the simplest
one.) Note that this also applies to RenderX XEP. Notice how the PDF also does 
not look perfect in certain areas.

For example, you'll have to use the xfc:tab-position extension attribute 
(ignored by all XSL-FO processors, expect ours). More info:
http://www.xmlmind.com/foconverter/_distrib/doc/user/implementation.html#leaders



 
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to