From a58ea3c6cb0dab7ca06a3897f7ae66fac8d11e9d Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Mon, 4 Mar 2024 11:07:28 +0300 Subject: [PATCH] updated for attachments support, metanorma/metanorma-standoc#872 --- src/main/java/org/metanorma/fop/PDFGenerator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/metanorma/fop/PDFGenerator.java b/src/main/java/org/metanorma/fop/PDFGenerator.java index 00c04e7..afe419b 100644 --- a/src/main/java/org/metanorma/fop/PDFGenerator.java +++ b/src/main/java/org/metanorma/fop/PDFGenerator.java @@ -417,7 +417,9 @@ private void convertmn2pdf(fontConfig fontcfg, XSLTconverter xsltConverter, File additionalXSLTparams.setProperty("basepath", basepath); File fInputXML = new File(inputXMLFilePath); - additionalXSLTparams.setProperty("inputxml_basepath", fInputXML.getParent() + File.separator); + String fInputXMLParent = fInputXML.getAbsoluteFile().getParent() + File.separator; + + additionalXSLTparams.setProperty("inputxml_basepath", fInputXMLParent); additionalXSLTparams.setProperty("inputxml_filename", fInputXML.getName()); xsltConverter.setParams(additionalXSLTparams);