-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add xml info to pdf metadata2 #15
Add xml info to pdf metadata2 #15
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15 +/- ##
==========================================
+ Coverage 90.51% 90.95% +0.43%
==========================================
Files 17 18 +1
Lines 1392 1360 -32
==========================================
- Hits 1260 1237 -23
+ Misses 132 123 -9 ☔ View full report in Codecov by Sentry. |
Sorry for the silence on this one, I will need to find some time to validate this against e.g. the Mustang test suite (if you did not already?) and I currently have limited time for this project. Will try to do it soon, though. Thanks for working on it! |
If I remember correctly I got interested into this change initially as some generated PDF did not validate. The problem was reported by verapdf, but it could have been also Mustang. However, the current code is for sure wrong regarding Issue #14. The code changes proposed by the original PR seem to be taken from the facture-x lib. Give me a bit time to get my validation chain fully functional and I can do more tests on this. I will report back. |
Not sure what you refer to exactly by I took the sample file There were zero (non white space) differences between the extracted XML and the drafthorse generated XML, which also validated using the kosit validator. I validated the generated PDF using veraPDF I validated the PDF and XML with Mustang CLI v2.10.0 which first failed as I used "EN16931" in attach_xml which resulted in 9 failed rules w.r.t. the
I fixed this to the correct "EN 16931" and the validation worked. However, the validator reported
The PDF metadata generated by this PR are somewhat simplified over the original PR (as viewed in Acrobat). Take your time to review all of this (I know you are busy, I was just enjoying reading your excellent post on My little trade show – enterprise sales is magic (we experienced a very similar thing, thus with a much less professional looking result) and some of your other posts. Nice reads!), but I think the changes are an improvement over trunk and most importantly fix Issue #14. Thanks for this lib! |
…hema.py` generator)
…e and remove hard coded English language
… restriction to documents of type 380) to simplify the code and remove hard coded English language
…se of use bare `except`
…0 for an invoice." test
…ction to cover XRECHNUNG
…ions (logging-fstring-interpolation)
…r used by PDF readers for blind people
c6f84d6
to
2fb3a1c
Compare
This one is a conservative adjustment of the stalled PR #14 which among others fixes Issue #14 and tries to follow all of the reviewers valuable comments.
This PR fixes also the typo raised in Issue #13.
Hopefully this leads to a v2.3.1 release on PyPIP fixing the current version mismatch (Issue #12) which would make this lib way more useful without modifications.
While this PR lifts the restriction of the document type code to 380 (INVOICE) the DocumentType in the PDF XMP is still fixed to
INVOICE
. A proper handling would require the use of complete mapping of valid document type codes to corresponding DocumentTypes.