diff --git a/Makefile b/Makefile index 07f41e0..0befd86 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.94 +JAR_VERSION := 1.95 JAR_FILE := mn2pdf-$(JAR_VERSION).jar all: target/$(JAR_FILE) diff --git a/README.adoc b/README.adoc index d518b8f..9f9e2f7 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.94.jar --xml-file --xsl-file --pdf-file [--syntax-highlight] +java -Xss5m -Xmx2048m -jar target/mn2pdf-1.95.jar --xml-file --xsl-file --pdf-file [--syntax-highlight] ---- e.g. [source,sh] ---- -java -Xss5m -Xmx2048m -jar target/mn2pdf-1.94.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.95.jar --xml-file tests/G.191.xml --xsl-file tests/itu.recommendation.xsl --pdf-file tests/G.191.pdf ---- === PDF encryption features @@ -100,7 +100,7 @@ Update version in `pom.xml`, e.g.: ---- org.metanorma.fop mn2pdf -1.94 +1.95 Metanorma XML to PDF converter ---- @@ -111,8 +111,8 @@ Tag the same version in Git: [source,xml] ---- -git tag v1.94 -git push origin v1.94 +git tag v1.95 +git push origin v1.95 ---- Then the corresponding GitHub release will be automatically created at: diff --git a/pom.xml b/pom.xml index c486dff..129cd81 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.metanorma.fop mn2pdf - 1.94 + 1.95 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 cda7ff0..6e69aa4 100644 --- a/src/main/java/org/metanorma/fop/PDFGenerator.java +++ b/src/main/java/org/metanorma/fop/PDFGenerator.java @@ -489,6 +489,8 @@ private void runFOP (fontConfig fontcfg, Source src, File pdf) throws IOExceptio String methodName = getClass().getSimpleName() + "." + (new Object(){}.getClass().getEnclosingMethod().getName()); Profiler.addMethodCall(methodName); + PDFUA_error = false; + OutputStream out = null; String xmlIF = null; long startMethodTime = System.currentTimeMillis(); @@ -650,7 +652,7 @@ private void runFOP (fontConfig fontcfg, Source src, File pdf) throws IOExceptio - if (isAddAnnotations) { + if (isAddAnnotations && PDFUA_error == false) { logger.log(Level.INFO, "[INFO] Annotation processing..."); try { @@ -665,7 +667,7 @@ private void runFOP (fontConfig fontcfg, Source src, File pdf) throws IOExceptio Annotation annotations = new Annotation(); annotations.process(pdf, xml_review); } catch (Exception ex) { - logger.severe("Can't add annotation."); + logger.severe("Can't add annotation (" + ex.toString() + ")."); ex.printStackTrace(); } }