Skip to content

Conversation

al-niessner
Copy link
Contributor

🗒️ Summary

Changed PDFUtils to not record target as unchanging value.

⚙️ Test Data and/or Report

Beyond reach of regression tests. Was this:

  FAIL: test3_invalid_pdfa_3a.xml
      ERROR  [error.pdf.file.not_pdfa_compliant]   Invalid PDF/A version detected for test3_invalid_pdfa_3a.pdf. Expected: 1a or 1b. Actual: 3a
        1 product validation(s) completed
  FAIL: test1_invalid_pdfa_2b.xml
      ERROR  [error.pdf.file.not_pdfa_compliant]   Invalid PDF/A version detected for test3_invalid_pdfa_3a.pdf. Expected: 1a or 1b. Actual: 2b

Notice that on the second test it still shows the first PDF file as the problem. This matches the reported issue. Updating to not use target in constructor:

  FAIL: test3_invalid_pdfa_3a.xml
      ERROR  [error.pdf.file.not_pdfa_compliant]   Invalid PDF/A version detected for test3_invalid_pdfa_3a.pdf. Expected: 1a or 1b. Actual: 3a
        1 product validation(s) completed
  FAIL: test1_invalid_pdfa_2b.xml
      ERROR  [error.pdf.file.not_pdfa_compliant]   Invalid PDF/A version detected for test1_invalid_pdfa_2b.pdf. Expected: 1a or 1b. Actual: 2b
        2 product validation(s) completed

Notice that the PDF names reflect the test label names better.

♻️ Related Issues

Closes #936

The PDFUtils was made to be a lazy instantiated static object in FileReferenceValidationRule. Unfortunately, the target URL is not static in this situation and has be passed in with the call. Removed target from constructor and added to method.
@al-niessner al-niessner requested a review from a team as a code owner June 18, 2024 15:49
Copy link
Member

@nutjob4life nutjob4life left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More Vera Greenfield! 👍

@jordanpadams jordanpadams changed the title 936: improper static information Update PDF-A checker to fix mismatched filenames in error messages Jun 20, 2024
@jordanpadams jordanpadams merged commit 6a42307 into main Jun 20, 2024
@jordanpadams jordanpadams deleted the issue_936 branch June 20, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate does not show correct filename for PDF/A failures when validating a directory
3 participants