diff --git a/Makefile b/Makefile index af33c975..b5959ca5 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SHELL ?= /bin/bash endif #JAR_VERSION := $(shell mvn -q -Dexec.executable="echo" -Dexec.args='$${project.version}' --non-recursive exec:exec -DforceStdout) -JAR_VERSION := 1.37 +JAR_VERSION := 1.38 JAR_FILE := mn2pdf-$(JAR_VERSION).jar all: target/$(JAR_FILE) diff --git a/README.adoc b/README.adoc index 4a87bbdb..226daead 100644 --- a/README.adoc +++ b/README.adoc @@ -17,14 +17,14 @@ You will need the Java Development Kit (JDK) version 8, Update 241 (8u241) or hi [source,sh] ---- -java -Xss5m -Xmx2048m -jar target/mn2pdf-1.37.jar --xml-file --xsl-file --pdf-file +java -Xss5m -Xmx2048m -jar target/mn2pdf-1.38.jar --xml-file --xsl-file --pdf-file ---- e.g. [source,sh] ---- -java -Xss5m -Xmx2048m -jar target/mn2pdf-1.37.jar --xml-file tests/G.191.xml --xsl-file tests/itu.recommendation.xsl --pdf-file tests/G.191.pdf +java -Xss5m -Xmx2048m -jar target/mn2pdf-1.38.jar --xml-file tests/G.191.xml --xsl-file tests/itu.recommendation.xsl --pdf-file tests/G.191.pdf ---- @@ -61,7 +61,7 @@ Update version in `pom.xml`, e.g.: ---- org.metanorma.fop mn2pdf -1.37 +1.38 Metanorma XML to PDF converter ---- @@ -72,8 +72,8 @@ Tag the same version in Git: [source,xml] ---- -git tag v1.37 -git push origin v1.37 +git tag v1.38 +git push origin v1.38 ---- Then the corresponding GitHub release will be automatically created at: diff --git a/pom.xml b/pom.xml index a670ea69..997a8b3c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.metanorma.fop mn2pdf - 1.37 + 1.38 Metanorma XML to PDF converter jar https://www.metanorma.org diff --git a/src/main/java/org/metanorma/fop/PDFGenerator.java b/src/main/java/org/metanorma/fop/PDFGenerator.java index a8523c8a..b49c7a00 100644 --- a/src/main/java/org/metanorma/fop/PDFGenerator.java +++ b/src/main/java/org/metanorma/fop/PDFGenerator.java @@ -263,7 +263,12 @@ private void convertmn2pdf(fontConfig fontcfg, SourceXMLDocument sourceXMLDocume // index.xml was created for bilingual document additionalXSLTparams.setProperty("external_index", fileXmlIF.getAbsolutePath()); } - additionalXSLTparams.setProperty("basepath", sourceXMLDocument.getDocumentFilePath() + File.separator); + String basepath = sourceXMLDocument.getDocumentFilePath() + File.separator; + // redefine basepath + if (xsltParams.containsKey("baseassetpath")) { + basepath = xsltParams.getProperty("baseassetpath") + File.separator; + } + additionalXSLTparams.setProperty("basepath", basepath); xsltConverter.setParams(additionalXSLTparams); //System.out.println("[INFO] XSL-FO file preparation...");