OpenPDF icon indicating copy to clipboard operation
OpenPDF copied to clipboard

Provide PDF/A conform annotations

Open vuilleumierc opened this issue 1 year ago • 1 comments

Description of the new Feature/Bugfix

It's currently not possible to create annotations which are PDF/A conform. The validation test with VeraPDF fails with this message:

ruleId=RuleId [specification=ISO 19005-1:2005, clause=6.5.3, testNumber=2], status=failed, message=An annotation dictionary shall contain the F key. The F key’s Print flag bit shall be set to 1 and its Hidden, Invisible and NoView flag bits shall be set to 0

Related Issue: #980

Unit-Tests for the new Feature/Bugfix

  • [ ] Unit-Tests added to reproduce the bug
  • [x] Unit-Tests added to the added feature

Compatibilities Issues

As far as I can tell this does not cause compatibility issues. Would you consider a backport to 1.3.x?

Testing details

Not that I know of.

Thanks in advance for your review / comments

vuilleumierc avatar Feb 27 '24 09:02 vuilleumierc

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Feb 27 '24 10:02 sonarqubecloud[bot]

Any advice on the CodeFactor issue? I already refactored the changes into one method. I don't see how to further reduce the complexity apart from refactoring the existing constructors, which seems to be beyond the scope of this PR

vuilleumierc avatar Feb 29 '24 08:02 vuilleumierc

I think the tools are a little too paranoid by now. Still configuring then. CodeFactor is ok.

Further PRs for 1.4 and 1.3 are welcome. Backport should not be a problem.

asturio avatar Feb 29 '24 20:02 asturio

Will you submit PRs for the other PDF/A issues described in #980? Thank you!

andreasrosdal avatar Feb 29 '24 21:02 andreasrosdal

I think the only blocking issue for us was with the annotations (see https://github.com/TIBCOSoftware/jasperreports/issues/410) For instance calling createXmpMetadata() already solves a couple of these errors. But we will keep that in mind and we much appreciate the possibility to submit PRs :+1:

vuilleumierc avatar Mar 04 '24 08:03 vuilleumierc