Re: barcode support and XMLMind XSL-FO converter
Hussein Shafie <[email protected]> Fri, 14 Sep 2018 09:38:50 +0200
| Newsgroups | gmane.text.xml.xfc.general |
|---|---|
| Message-ID | <[email protected]> |
On 09/13/2018 06:43 PM, Nelson, Robert wrote:
>
>
> We are trying to figure out how to have barcodes in our RTF documents
> that include current page number and total page number.
>
>
>
> We are using Barcode4J. It is working fine besides the page number support.
>
This looks like what follows:
Excerpts from the sample barcodes2xsl-fo.xsl XSLT stylesheet:
---
<xsl:variable name="barcode-cfg">
<barcode>
<ean-13/>
</barcode>
</xsl:variable>
<fo:block>A normal barcode:</fo:block>
<fo:block>
<fo:instream-foreign-object>
<xsl:copy-of select="barcode:generate($barcode-cfg,
'4006408551379')"/>
</fo:instream-foreign-object>
</fo:block>
---
Obviously, Barcode4J's barcode:generate() needs to be passed a string,
whether a literal string or a string computed by the XSLT stylesheet.
>
>
> I thought I would reach out to see if anyone has any suggestions either
> with getting that to work with Barcode4J or perhaps you have a different
> suggestion.
>
>
Sorry but there is no way to obtain the current page number and total
page number whether in the context of the XSLT engine (XSLT) or in the
context of XMLmind XSL-FO Processor (XSL-FO).
Only MS-Word knows what is the current page number and the total page
number at the time you open the generated RTF in the word processor.
For example, in XMLmind XSL-FO Processor, fo:page-number
(https://www.w3.org/TR/xsl/#fo_page-number) is implemented by
instructing MS-Word to dynamically insert the current page number in the
opened document (by the means of the "\chpgn" RTF control word).
Your question is somewhat related to this FAQ:
---
Q: 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
--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support