From 854a9eeb5d42ff013b6bd23160be3de7b2a3f4ba Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Thu, 26 Sep 2024 21:40:39 +0300 Subject: [PATCH 1/8] verapdfcheck.yml updated for PDF/UA-1, metanorma/mn2pdf#287 --- .github/workflows/verapdfcheck.yml | 35 +++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/verapdfcheck.yml b/.github/workflows/verapdfcheck.yml index 0e95e8553..db9b5b56f 100644 --- a/.github/workflows/verapdfcheck.yml +++ b/.github/workflows/verapdfcheck.yml @@ -1,6 +1,6 @@ name: verapdfcheck -on: push +on: pull_request jobs: check: @@ -33,21 +33,40 @@ jobs: run: | timeout 20s sh -c 'until curl http://localhost:8080/api/ | grep -q verapdf-rest; do echo "Waiting until container to be healthy..."; sleep 1; done' - - name: Check PDFs using veraPDF + - name: Check PDFs for PDF/A-3a using veraPDF run: | - find ./ -type f -name "*.pdf" -exec curl -F "file=@{}" localhost:8080/api/validate/3a -H "Accept:application/xml" -o "{}.verapdf.report.xml" \; + find ./ -type f -name "*.pdf" -exec curl -F "file=@{}" localhost:8080/api/validate/3a -H "Accept:application/xml" -o "{}.verapdf.3a.report.xml" \; - name: List files run: | - find ./ -type f -name "*.verapdf.report.xml" + find ./ -type f -name "*.verapdf.3a.report.xml" - - name: Check veraPDF XML reports on errors + - name: Check veraPDF PDF/A-3a XML reports on errors run: | - err_files_name=err.files.txt + err_files_name=err.files.3a.txt [ -e $err_files_name ] && rm $err_files_name - for f in $(find ./ -type f -name '*.verapdf.report.xml'); do grep -l 'status=\"failed\"' $f >> $err_files_name && cat $f; done + for f in $(find ./ -type f -name '*.verapdf.3a.report.xml'); do grep -l 'status=\"failed\"' $f >> $err_files_name && cat $f; done if [ -s $err_files_name ]; then - echo "veraPDF found PDF errors:" + echo "veraPDF found PDF/A-3a errors:" + cat $err_files_name + exit 1 + fi + + - name: Check PDFs for PDF/UA-1 using veraPDF + run: | + find ./ -type f -name "*.pdf" -exec curl -F "file=@{}" localhost:8080/api/validate/ua1 -H "Accept:application/xml" -o "{}.verapdf.ua1.report.xml" \; + + - name: List files + run: | + find ./ -type f -name "*.verapdf.ua1.report.xml" + + - name: Check veraPDF PDF/UA-1 XML reports on errors + run: | + err_files_name=err.files.ua1.txt + [ -e $err_files_name ] && rm $err_files_name + for f in $(find ./ -type f -name '*.verapdf.ua1.report.xml'); do grep -l 'status=\"failed\"' $f >> $err_files_name && cat $f; done + if [ -s $err_files_name ]; then + echo "veraPDF found PDF/UA-1 errors:" cat $err_files_name exit 1 fi From 0000231b73abac0484ccbc0f254c2bd6b2666b89 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Fri, 27 Sep 2024 19:07:42 +0300 Subject: [PATCH 2/8] xslt updated to prevent empty table cell, metanorma/mn2pdf#295 --- xslt_src/common.xsl | 3 +++ xslt_src/iso.international-standard.core.xsl | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xslt_src/common.xsl b/xslt_src/common.xsl index 52eb29860..a98ad82d7 100644 --- a/xslt_src/common.xsl +++ b/xslt_src/common.xsl @@ -8825,6 +8825,7 @@ +   @@ -8901,6 +8902,8 @@  end +   + diff --git a/xslt_src/iso.international-standard.core.xsl b/xslt_src/iso.international-standard.core.xsl index 3fd3b8ba7..c7ce9904e 100644 --- a/xslt_src/iso.international-standard.core.xsl +++ b/xslt_src/iso.international-standard.core.xsl @@ -1863,8 +1863,7 @@ -   - +   From 2d25fde7221ed395f509699222959851660eea95 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Fri, 27 Sep 2024 20:28:55 +0300 Subject: [PATCH 3/8] tag Annot added for File Attachment annotation, metanorma/mn2pdf#293 --- xslt_src/common.xsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xslt_src/common.xsl b/xslt_src/common.xsl index a98ad82d7..5b675566d 100644 --- a/xslt_src/common.xsl +++ b/xslt_src/common.xsl @@ -12431,6 +12431,9 @@ + + Annot + From 5a06a685d807f371e4b02e9d6244a5f4c351c2c2 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sat, 28 Sep 2024 21:44:26 +0300 Subject: [PATCH 4/8] xslt updated for PDF/UA compliance, metanorma/mn2pdf#295 --- xslt_src/common.xsl | 15 ++++++++ xslt_src/iso.international-standard.core.xsl | 38 ++++++++++++-------- 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/xslt_src/common.xsl b/xslt_src/common.xsl index 5b675566d..60568e87c 100644 --- a/xslt_src/common.xsl +++ b/xslt_src/common.xsl @@ -20615,4 +20615,19 @@ + + + + + + + + + + SKIP + + + + + diff --git a/xslt_src/iso.international-standard.core.xsl b/xslt_src/iso.international-standard.core.xsl index c7ce9904e..cda565fb6 100644 --- a/xslt_src/iso.international-standard.core.xsl +++ b/xslt_src/iso.international-standard.core.xsl @@ -1478,6 +1478,7 @@ + @@ -1792,7 +1793,7 @@ - + @@ -1863,7 +1864,7 @@ -   +   @@ -1876,12 +1877,12 @@ -   -   -   +   +   +   -   +   @@ -1917,7 +1918,7 @@ - + @@ -2573,7 +2574,7 @@ - + @@ -2775,7 +2776,11 @@ - + + + + + @@ -4946,6 +4951,7 @@ + @@ -4959,15 +4965,15 @@ -   +   -   -   -   +   +   +   -   +   @@ -5003,6 +5009,8 @@ + + @@ -5324,7 +5332,7 @@ -   +   From 50936101d5fb035d820de8dcf69208b28a895090 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sun, 29 Sep 2024 19:02:09 +0300 Subject: [PATCH 5/8] xslt updated for fixing issue with Hn, metanorma/mn2pdf#289 --- xslt_src/common.xsl | 12 ++++++++++++ xslt_src/iec.international-standard.core.xsl | 10 ++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/xslt_src/common.xsl b/xslt_src/common.xsl index 60568e87c..a85b2005d 100644 --- a/xslt_src/common.xsl +++ b/xslt_src/common.xsl @@ -19875,6 +19875,12 @@ + @@ -19895,6 +19901,9 @@ + + + @@ -19904,6 +19913,9 @@ + + + diff --git a/xslt_src/iec.international-standard.core.xsl b/xslt_src/iec.international-standard.core.xsl index 2544802fd..e58d7b4c3 100644 --- a/xslt_src/iec.international-standard.core.xsl +++ b/xslt_src/iec.international-standard.core.xsl @@ -1355,9 +1355,11 @@ - + + + - + @@ -1372,7 +1374,7 @@ - + @@ -1842,7 +1844,7 @@ - + 11pt From d6dc7c9ad126b1ab1c40b5681987bcb52c004647 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sun, 29 Sep 2024 20:18:14 +0300 Subject: [PATCH 6/8] xslt updated for fixing issue with Hn, metanorma/mn2pdf#289 [skip actions] --- xslt_src/common.xsl | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/xslt_src/common.xsl b/xslt_src/common.xsl index a85b2005d..a0051360d 100644 --- a/xslt_src/common.xsl +++ b/xslt_src/common.xsl @@ -19902,10 +19902,26 @@ - + + + + + + + + + - + + + + + + + + + @@ -19914,7 +19930,15 @@ - + + + + + + + + + From b63c1af7d279ebc23ddf6b31fd0a3f40a6b96107 Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sun, 29 Sep 2024 22:53:16 +0300 Subject: [PATCH 7/8] Makefile updated for mn2pdf v2.02 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f0491988..5eeb9ea5f 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ XSLT_GENERATED := xslt/iec.international-standard.xsl \ xslt/bipm.rapport.xsl \ xslt/jcgm.standard.xsl -MN2PDF_DOWNLOAD_PATH := https://github.com/metanorma/mn2pdf/releases/download/v2.01/mn2pdf-2.01.jar +MN2PDF_DOWNLOAD_PATH := https://github.com/metanorma/mn2pdf/releases/download/v2.01/mn2pdf-2.02.jar # MN2PDF_DOWNLOAD_PATH := https://maven.pkg.github.com/metanorma/mn2pdf/com/metanorma/fop/mn2pdf/1.7/mn2pdf-1.7.jar MN2PDF_EXECUTABLE := $(notdir $(MN2PDF_DOWNLOAD_PATH)) From d17013d7a3475d0930604658ed0755ac7b3e78df Mon Sep 17 00:00:00 2001 From: Alexander Dyuzhev Date: Sun, 29 Sep 2024 23:25:55 +0300 Subject: [PATCH 8/8] Makefile updated for mn2pdf v2.02 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5eeb9ea5f..d4458fd41 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ XSLT_GENERATED := xslt/iec.international-standard.xsl \ xslt/bipm.rapport.xsl \ xslt/jcgm.standard.xsl -MN2PDF_DOWNLOAD_PATH := https://github.com/metanorma/mn2pdf/releases/download/v2.01/mn2pdf-2.02.jar +MN2PDF_DOWNLOAD_PATH := https://github.com/metanorma/mn2pdf/releases/download/v2.02/mn2pdf-2.02.jar # MN2PDF_DOWNLOAD_PATH := https://maven.pkg.github.com/metanorma/mn2pdf/com/metanorma/fop/mn2pdf/1.7/mn2pdf-1.7.jar MN2PDF_EXECUTABLE := $(notdir $(MN2PDF_DOWNLOAD_PATH))