Hi Jérôme,
Yes, please feel free to extend the existing FOP module. Inside the JAR file you’ll find the original FOP.java file.
Looking forward to hearing more about your experiences, Christian
On Tue, Jan 5, 2021 at 12:51 PM Jerome Chauveau jerome.chauveau@unicaen.fr wrote:
Hi,
I am now trying to use custom fonts with the FOP module.
Has anyone ever tried such a thing ?
FOP can take a config file as parameter where fonts configuration can be specified. I might be wrong but according to the Fop.transform function's signature, this feature seems to be unavailable through the BaseX module.
Should I modify (based on https://xmlgraphics.apache.org/fop/1.1/embedding.html#config-external) and recompile the module ?
Thanks
Regards,
Jérôme
----- Mail original ----- De: "jerome chauveau" jerome.chauveau@unicaen.fr À: "Christian Grün" christian.gruen@gmail.com Cc: "basex-talk" basex-talk@mailman.uni-konstanz.de Envoyé: Mercredi 16 Décembre 2020 09:39:22 Objet: Re: [basex-talk] FOP module
Thanks a lot Christian !
Jérôme ----- Mail original ----- De: "Christian Grün" christian.gruen@gmail.com À: "jerome chauveau" jerome.chauveau@unicaen.fr, "Andy Bunce" bunce.andy@gmail.com Cc: "basex-talk" basex-talk@mailman.uni-konstanz.de Envoyé: Mardi 15 Décembre 2020 14:35:28 Objet: Re: [basex-talk] FOP module
Hi Jérôme, hi Andy,
We have aligned all modules with the latest version of BaseX (including the FOP, FTP and Map module).
Hope this helps, Christian
On Tue, Dec 8, 2020 at 3:09 PM Jerome Chauveau jerome.chauveau@unicaen.fr wrote:
Hi,
I am trying to use the (too old ?) FOP module, but unsuccessfully. I copied that example :
import module namespace fop = 'org.basex.modules.fop.FOP'; let $xsl := xslt:transform('fop.xml', 'fop.xsl') let $pdf := fop:transform($xsl) return file:write-binary('fop.pdf', $pdf)
from this thead : https://mailman.uni-konstanz.de/pipermail/basex-talk/2014-February/006326.ht...
which generates that error (in a BaseX 9.3) :
[XPTY0004] class org.basex.modules.fop.FOP tried to access private method 'void org.basex.query.value.item.B64.<init>(byte[])' (org.basex.modules.fop.FOP and org.basex.query.value.item.B64 are in unnamed module of loader 'app'). Caused by: FOP:transform(document-node()).
Any suggestions on how to fix this ? Thanks
Regards
Jérôme