PDF generated by SaveToPdfAsync fails validation by mustang #570
Replies: 4 comments 23 replies
-
Are you using the Alpha version from nuget or the current code from github? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@ThomasSpeedy : sounds great. I set up a ruleset, can you try to issue a PR? Otherwise, we can also use the simple method: feel free to just zip the code and upload it here. |
Beta Was this translation helpful? Give feedback.
-
@ThomasSpeedy : I added to the existing test case and accidently dropped the changes into the master but imho that doesn't make the implementation worse. |
Beta Was this translation helpful? Give feedback.
-
Hello, I generated a zugferd pdf using an existing pdf file by using SaveToPdfAsync(). The generated pdf file can be opened by adobe acrobate and looks like the original pdf but with added xml and is reported to be PDF/A-3A. Then I used mustang's validation tool to validate the generated pdf file. Unfortunately mustang reports some errors:
... ValidationResult [flavour=3a, totalAssertions=17146, assertions=[TestAssertion [ruleId=RuleId [specification=ISO 19005-3:2012, clause=6.1.7.1, testNumber=1], status=failed, message=The value of the Length key specified in the stream dictionary shall match the number of bytes in the file following the LINE FEED (0Ah) character after the stream keyword and preceding the EOL marker before the endstream keyword, location=Location [level=CosDocument, context=root/indirectObjects[18](4 0)/directObject[0]], locationContext=null, errorMessage=Actual length of the stream (8093 byte(s)) does not match the value of the Length key in the Stream dictionary (8094 byte(s))], TestAssertion [ruleId=RuleId [specification=ISO 19005-3:2012, clause=6.2.11.4.1, testNumber=1], status=failed, message=The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9, location=Location [level=CosDocument, context=root/document[0]/pages[0](16 0 obj PDPage)/contentStream[0](15 0 obj PDContentStream)/operators[22]/font[0](CenturyGothic)], locationContext=null, errorMessage=The font program is not embedded], TestAssertion [ruleId=RuleId [specification=ISO 19005-3:2012, clause=6.2.11.4.1, testNumber=1], status=failed, message=The font programs for all fonts used for rendering within a conforming file shall be embedded within that file, as defined in ISO 32000-1:2008, 9.9, location=Location [level=CosDocument, context=root/document[0]/pages[0](16 0 obj PDPage)/contentStream[0](15 0 obj PDContentStream)/operators[841]/font[0](CenturyGothic,Bold)], locationContext=null, errorMessage=The font program is not embedded]], isCompliant=false] ...
How can I generate a valid pdf?
Thanks in advance for any advice!
Thomas
Beta Was this translation helpful? Give feedback.
All reactions