Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-80731

Invalid /Lang attribute in generated PDF files

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80731-403
    • Hide

      Setup

      1. Use Windows
      2. Download PAC 2021 from https://pdfua.foundation/en/pdf-accessibility-checker-pac/
      3. Extract the contents of the downloaded archive to your desktop
      4. Have Adobe Acrobat installed

      Test

      1. Log in as admin
      2. Navigate to General > Language > Language packs in site administration
      3. Install English for Workplace (en_wp) language pack
      4. Switch language to English for Workplace using user menu
      5. Navigate to following URL:

        <WWWROOT>/lib/tests/other/pdflibtestpage.php
        

      6. Press Continue
      7. Save the generated PDF file locally
      8. Open the PAC 2001 tool on your local machine
      9. Drag the downloaded PDF file into the program
      10. Confirm the Language field shows en (not en_wp)
      11. Open the downloaded PDF file in Adobe Acrobat
      12. Select Menu > Document Properties > Advanced
      13. Confirm the Language field shows English (not en_wp)
      Show
      Setup Use Windows Download PAC 2021 from https://pdfua.foundation/en/pdf-accessibility-checker-pac/ Extract the contents of the downloaded archive to your desktop Have Adobe Acrobat installed Test Log in as admin Navigate to General > Language > Language packs in site administration Install English for Workplace (en_wp) language pack Switch language to English for Workplace using user menu Navigate to following URL: <WWWROOT>/lib/tests/other/pdflibtestpage.php Press Continue Save the generated PDF file locally Open the PAC 2001 tool on your local machine Drag the downloaded PDF file into the program Confirm the Language field shows en (not en_wp ) Open the downloaded PDF file in Adobe Acrobat Select Menu > Document Properties > Advanced Confirm the Language field shows English (not en_wp )
    • WP Sprint 2024-I1.2 (Clones)

      During recent accessibility audit for Workplace, it came to light that PDF files being generated are non-compliant with accessibility standards in various ways (WPOS-71)

      One of their failing criteria was as follows:

      http://www.w3.org/TR/WCAG20-TECHS/pdf.html#PDF16
      PDF16 Setting the default language using the /Lang entry in the document catalogue of a PDF document
      (Language set to en_wp which is not a recognised lang attribute)

      This is the same problem we resolved in MDL-80185. We can apply the same solution here

      Pinging pedro.jordao@moodle.com for info

        1. Acrobat.png
          Acrobat.png
          15 kB
        2. MDL-80731.png
          MDL-80731.png
          160 kB
        3. PAC.png
          PAC.png
          34 kB
        4. Screenshot 2024-02-26 at 1.04.49 PM.png
          Screenshot 2024-02-26 at 1.04.49 PM.png
          1.71 MB
        5. Screenshot 2024-02-26 at 12.59.01 PM.png
          Screenshot 2024-02-26 at 12.59.01 PM.png
          133 kB

            pholden Paul Holden
            pholden Paul Holden
            Pedro Jordao Pedro Jordao
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 12 minutes
                4h 12m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.