On 10/09/2017 02:29 AM, Jack Reyneke wrote:


We are evaluating XFC for XSL:FO to DocX conversion.


We need to print "Page ## of ##" at the bottom of the page. E.g. Page 1
of 4.


Using Apache FOP this was the solution:

         <fo:block text-align="end" margin-right="30pt"
margin-bottom="70pt">
                        Page <fo:page-number/> of
<fo:page-number-citation ref-id="TheVeryLastPage"/>
         </fo:block>
....

         <fo:block id="TheVeryLastPage"/>



This allowed the document to print the current page and insert a
reference to the last page. How can I achieve the same with XFC.


It's exactly the same when using XFC, but with a twist. XFC has no way to determine the page numbers. Only MS-Word can do this.

<fo:page-number/> and <fo:page-number-citation/> are translated by XFC to DOCX fields (having an initial value of "0") and the values of these fields must be updated by MS-Word itself after opening the generated DOCX file in the word processor.

More info in this FAQ:
---
I use the page-number-citation object to print the number of pages in my document, but the displayed value is always 0 when I load the document in MS-Word. How can I get the correct value?
---
http://www.xmlmind.com/foconverter/faq.html#fields





Lastly, we are evaluating it for running on a Linux machine and for
being called from Java. Will you please recommend the product I should
contact sales for.

I'm sorry but I don't have enough information to answer this question. I can simply say that you may not use "Desktop License" for that.

More info in "Which license to choose?", http://www.xmlmind.com/foconverter/which_license.html



So ideally we just want to use it as a Jar file from
inside a Java app for when people want to export to Word instead of PDF.



"Just the Jar file" xfc.jar *IS* the product. Everything else (XSL Utility, XSL Server) is given away when you purchase xfc.jar.



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

Reply via email to