Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55048

Exporting to PDF results in images incorrectly rearranged in PDF when using LaTex plugin in a page

    XMLWordPrintable

Details

    Description

      Hi,

      I use WritableDownloadResourceManager to include rendered macros in Confluence pages as PNGs. Under certain circumstances, these images are sometimes rearranged in the final output. I've included an example of the page output (as expected) and the PDF output (with rearranged images). The PDF output seems to be consistently wrong on every second rendering.

      I could not reproduce the error when exporting an entire space, only when exporting a single page with ... -> Export to PDF.

      The URLs in the macro output match the images written to Confluence's temp folder (in the correct order).

      This can be seen in production in the marketplace add-on Latex Math.

      Testing was done on Confluence 6.7.0.

      Support ticket: https://ecosystem.atlassian.net/browse/DEVHELP-985

      Steps:

      1. Spawn a Confluence Server 6.7.0
      2. Install LaTex Math plugin
      3. Create a new page and add a LaTex inline macro or if you have a source editor plugin, use this:
        <p>aa&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="294304a0-2b09-496e-942e-c90f2e804b7e"><ac:parameter ac:name="body">aaaaaa</ac:parameter></ac:structured-macro></p>
        <p>bb&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="0d66f4d1-fa02-4c96-9ccd-937c519215fd"><ac:parameter ac:name="body">bbbbbb</ac:parameter></ac:structured-macro></p>
        <p>cc&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="7f07a0ff-027b-41a2-87c1-8d0605e81b48"><ac:parameter ac:name="body">cccccc</ac:parameter></ac:structured-macro></p>
        <p>dd&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="4f267650-be81-420e-bd1c-38f2821344e2"><ac:parameter ac:name="body">dddddd</ac:parameter></ac:structured-macro></p>
        <p>ee&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="45369f7f-b322-4840-8035-6d73dd1db6d3"><ac:parameter ac:name="body">eeeeee</ac:parameter></ac:structured-macro></p>
        <p>ff&nbsp;<ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="20efbb6a-be02-4630-9567-a5d4d0dac23d"><ac:parameter ac:name="body">ffffff</ac:parameter></ac:structured-macro></p>
        <p>gg&nbsp;<strong><ac:structured-macro ac:name="mathinline" ac:schema-version="1" ac:macro-id="c00a223b-afc1-499c-83c4-227ddbd20b3d"><ac:parameter ac:name="body">gggggg</ac:parameter></ac:structured-macro></strong></p>
        
      4. Notice the difference when the page is published and when you export the page to PDF for several times (see attached PDF for reference as well)

      Workaround

      None

      Attachments

        1. DEV-TestwithLatexMathimages-1.pdf
          25 kB
        2. DEV-TestwithLatexMathimages-2.pdf
          23 kB
        3. DEV-TestwithLatexMathimages-3.pdf
          28 kB
        4. DEV-TestwithLatexMathimages-4.pdf
          24 kB
        5. Confluene page.png
          Confluene page.png
          10 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              acalantog Anne Calantog
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: