Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-72705

Jira cannot preview/render PDF attachments with versions 1.3 and 1.4 without embedded fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 8.13.16, 8.20.4, 8.22.0
    • 8.5.4, 8.7.1, 8.11.1, 8.13.6, 8.13.9, 8.18.1, 8.20.1
    • Issue - Attachments
    • None

    Description

      Issue Summary

      When attaching a PDF file with version 1.3 or 1.4 without embedded fonts in an issue, when clicking in PDF thumb to preview the file, Jira shows only a blank page.

      Steps to Reproduce

      1. Installed a fresh Jira instance on version 8.18.1.
      2. Created an empty project.
      3. Created an issue.
      4. Attached to this issue, a PDF file with versions 1.3, 1.4, and 1.5.
      5. When tried to preview these files from the issue screen, only PDF with version 1.5 opened properly, the PDF files on versions 1.3 and 1.4 only showed a blank page.
      6. Performed the same steps above in Chrome, Firefox and got the same results.
      7. Opening all 3 PDF files outside of Jira using any PDF reader, it was possible to view the file content normally.
      8. It was tested in few more Jira versions as 8.11.1, 8.13.6, 8.13.9, all with the same results

      Expected Results

      Being able to preview the PDF file with their respective content.

      Actual Results

      In the Logs and also in the HAR file it wasn't possible to see any error, only the message below in the Output Console.

      DEPRECATED JS - JQuery.fn.spin has been deprecated since 7.9.4 and will be removed in 9.0.0. Use <aui-spinner> instead.   
       clearMessage@http://localhost:48111/j8111/s/97339cc2146a5fbcff9fbca4b73a670a-CDN/-v59hgg/811002/6411e0087192541a09d88223fb51a6a0/8.0.0/_/download/batch/com.atlassian.jira.jira-fileviewer-plugin:atlassian-fileviewer/com.atlassian.jira.jira-fileviewer-plugin:atlassian-fileviewer.js?locale=en-BR:4650:52 batch.js:244:46

      Below, a screenshot with current results

      Workaround

      Convert the file

      1. Open the PDF file with version 1.3 or 1.4 in any PDF Reader.
      2. Save or Export the file in another file format like Word.
      3. Open the file exported/saved in step 2 and then export it again to PDF using 1.5 version or higher.

      Use browser's PDF viewer

      • Right click and 'Open in new tab/window'. This causes it to use the browser's PDF viewer and not the one built into Jira.

      Note from users

      Credit to 26325d6c4916

      The issue seems to occur whenever fonts where used in the PDF that are not embedded within the file itself.
      This provides two solutions (we could think of) that need to be considered when generating PDFs:

      Make sure the software that embeds PDFs embeds the fonts within the file.
      Alternatively: The PDF shouldn't contain any actual text but just paths - however, this likely makes Text unselectable.

      and 640024a5d536

      I did some extensive research on this. Pdf's earlier than Version 1.5 use the accessibility plugin (Adobe) which was deactivated somewhere in May this year after 20 years being EOL. One of the things this plugin provided was supply fonts and formats to PDF viewing software.
      There were two ways this plugin could be used in a program: Embed it in your own (small piece of code/library) or call the weblink provided by Adobe (which downloads this plugin every time again).

      Programmers who would spare some bytes of code or were simply lazy implemented the last option.
      Although Adobe announced the EOL and also announced the deactivation of the weblink, programmers forgot about the implementation in their software and never fixed it.

      That is why PDF's V1.4 and lower don't render the Fonts any more when software is using the second option.

      Nevertheless, complaining about this, at Atlassian, I found out that Atlassian doesn't feel responsible for this because there is a Workaround (saving and opening the PDF, so not using the preview from Jira for PDF's < Version 1.5 and replacing the PDF with a higher Version).

      Note: PDF Version 1.5 (maybe V1.6 too, but could not find documentation about that) still implemented the new and the old way to render Fonts, so therefore, depending on the software the PDF was created with, used the old way and doesn't render, but as I found out, the most programs switched to the new way.

      Attachments

        Issue Links

          Activity

            People

              cf7069360d7e Mateusz Witkowski
              7ce9530e8bba Manoel da Silva
              Votes:
              36 Vote for this issue
              Watchers:
              53 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: