Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF not compatible with PDF/A-1a #123

Open
peterschaer opened this issue Feb 3, 2023 · 15 comments
Open

PDF not compatible with PDF/A-1a #123

peterschaer opened this issue Feb 3, 2023 · 15 comments
Assignees

Comments

@peterschaer
Copy link
Collaborator

It seems that the PDFs created by pyramid_oereb_mfp are not compatible with PDF/A-1A. Other pyramid_oereb_mfp cantons also seem to be affected - as can be seen here and here.

When I validate some of our PDFs with VeraPDF, I get the following two errors with our PDFs:
image

I have attached the PDF and the validation report. In our case, two errors are found:
20230203123527_extract.pdf
Validation Report.pdf

I was able to narrow down the annotation error to the hyperlinks. In the other error, the ICC profile seems to be incompatible. Since I have too little knowledge of mapfish_print and Jasper Reports, I can't get any further here.

We use the following versions:

  • pyramid_oereb 2.4.1
  • pyramid_oereb_mfp (up to commit cc50d20)
  • mapfish_print 3.29 (docker image from camptocamp)

We have activated PDFA/1a in

What about the other cantons that use pyramid_oereb_mfp? Do you also have these errors? Do we want to investigate these errors?

@michmuel
Copy link
Collaborator

michmuel commented Feb 3, 2023

We have the same error messages concerning PDF/A compliance as BE.

We use also

  • camptocamp/mapfish_print:3.29
  • pyramid-oereb==2.4.1

I would appreciate if this could be fixed. Maybe @jwkaltz or @voisardf know if that can be done.

@sitj-marc
Copy link

Peter, I opened your file (20230203123527_extract.pdf) with Adobe Acrobat and I did got the blue message on the top that this file is conform to PDF/A

image

@peterschaer
Copy link
Collaborator Author

The blue message does not mean that the PDF is really compatible with PDF/A-1a, but only that it claims compatibility. Acrobat Reader does not check whether the PDF is compatible with PDF/A-1a or not. To do this you have to use some other tool like VeraPDF.

I also misunderstood this for a long time. The Confederation at the time of their acceptance tests probably did that too ;-)

@sitj-marc
Copy link

OK, good to know. Thank you for your feedback. Maybe the blue message is enough for the Confederation ;-)

@voisardf
Copy link
Collaborator

voisardf commented Feb 6, 2023

ok, I was not aware of that either. I guess we have the same issues as we use the same versions.
I'll have to check to be sure.

@peterschaer
Copy link
Collaborator Author

While experimenting around, I noticed the following: if I comment out the federal logo, then the validation error with the ICC profile is no longer present. I.e. the way the federal logo is embedded is not PDF/A-1A compliant. All other images (logos canton, municipality, PLR, maps, legend images...) are embedded correctly. However, I have no idea why this is so.

@voisardf
Copy link
Collaborator

voisardf commented Apr 5, 2023

@peterschaer @jwkaltz
Thanks Peter. I guess the federal logo we load(ed) in our database does not respect the compliance or has an other .icc profile than indicated.

I also conducted some tests replacing the hyperlinks by simple text fields and the remaining validation issues vanish.
My conclusion is that the hyperlinkReference definition in the Jasper Report is missing something to be created pdf/a-1 compliant.
Maybe @marionb or @sbrunner have already heard about that or are able to find out why? Missing library? Missing definition?

Looking at jasper community pages it should be possible to create compliant pdf's:
https://community.jaspersoft.com/wiki/pdf-support-jasperreports-library
and
https://jasperreports.sourceforge.net/sample.reference/hyperlink/

@voisardf
Copy link
Collaborator

@voisardf check with different pdf validation tools, if the error still appears

@jwkaltz jwkaltz self-assigned this Dec 19, 2023
@jwkaltz
Copy link
Member

jwkaltz commented Dec 28, 2023

Summary of findings so far:

@jwkaltz
Copy link
Member

jwkaltz commented Dec 28, 2023

Here is a proposal to extend the standard MapFish Print example test to include a hyperlink: mapfish/mapfish-print#3139

Note that with this extended example, the PDF output by MapFish Print has the same VeraPDF validation problem as the Oereb PDFs:
test-with-link.pdf

The validation output by VeraPDF is the same as reported above by @peterschaer, the rule https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Part-1-rules#rule-653-2 does not pass.

@jwkaltz
Copy link
Member

jwkaltz commented Dec 28, 2023

The issue can be reproduced with a stripped down example in JasperReports, I have opened an issue about that:
TIBCOSoftware/jasperreports#410

@jwkaltz
Copy link
Member

jwkaltz commented Mar 28, 2024

Update on this issue: it has been fixed; with the next release of MapFish-Print, this validation error should disappear.

@voisardf
Copy link
Collaborator

voisardf commented Apr 8, 2024

@jwkaltz great, thanks! could you indicate the version tag?

@jwkaltz
Copy link
Member

jwkaltz commented Apr 9, 2024

@jwkaltz great, thanks! could you indicate the version tag?

@voisardf there is no new release of MapFish-Print yet.

@lopo977
Copy link
Collaborator

lopo977 commented Nov 27, 2024

Another example from TI
CH630288071727.pdf

And the relative report
htmlReport.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants