Uploaded image for project: 'Graphviz Diagrams for Confluence'
  1. GVIZ-26

Graphviz image does not render to PDF or Word exports if too wide (though simple flowchart does)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: graph-from-table
    • Labels:
      None
    • Environment:

      Confluence 3.1.2
      Operating System Windows Server 2008 R2 6.1
      OS Architecture amd64
      Application Server Apache Tomcat/6.0.14
      Servlet Version 2.5
      Java Version 1.6.0_18

      Description

      Graphviz works fine for rendering to HTML pages, but exporting fails to include image in PDF or Word documents if the rendered image is too wide. This may be related to the Export API changes ( GVIZ-18 Closed ), but I'm not sure.

      The PDF export works if you constrain the width of the image in the macro attributes, such as:

      {graph-from-table:direction=TB|node=fillcolor=lightgrey,fontsize=8,fontname="Verdana", fontsize=8|edge=style=bold,color=blue|size="5,9"}
      

      Simple flowcharts work:

      {flowchart}
      A -> B
      B -> C
      C -> A
      {flowchart}
      

      But more complex graph-to-table graphs fail to get included, apparently because .png image is not found by Confluence page export code:

      {graph-from-table}
      | SampleCom |       |  | | | 100 | label="Excel"| 2000 | label="Moon" |
      | SampleCom | Work Items | label="Cuckoo Request",color=red | | | 200 | label="Alpha Manager"| 1000 | label="Moon" |
      | SampleCom | Market Data    | label="Joojoo Request",color=red | | | 201 | label="Jog Service" | 1000 | label="Earth" |
      | SampleCom | Calculated Data | label="Moo Request",color=red | | | 202 | label="RC Service"| 1000 | label="Earth" |
      | SampleCom | Portfolio Definition Data | label="Monster Request",color=red | | | 203 | label="Crafty Service" | 1000 | label="Earth" |
      | Work Items | GridNode1 | label="Delegate"| | | 300| label="Spaceship"| 1000 | label="Earth" |
      | Work Items | GridNode2 | label="Delegate"| | | 300| label="Spaceship"| 1000 | label="Earth" |
      {graph-from-table}
      

      Typical exception:

      2010-04-06 14:36:15,223 ERROR [http-80-10] [confluence.servlet.download.ExportDownload] getStreamForDownload com.atlassian.confluence.importexport.resource.DownloadResourceNotFoundException: Could not find file: /temp/graphviz4126027202525872259.png
       -- url: /download/temp/graphviz4126027202525872259.png | userName: mclark | referer: http://confluence/display/sonata/Grid+Executor+Service
      com.atlassian.confluence.importexport.resource.DownloadResourceNotFoundException: Could not find file: /temp/graphviz4126027202525872259.png
       at com.atlassian.confluence.importexport.resource.ExportDownloadResourceManager.getResourceReader(ExportDownloadResourceManager.java:70)
       at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReaderFromDelegate(DelegatorDownloadResourceManager.java:75)
       at com.atlassian.confluence.importexport.resource.DelegatorDownloadResourceManager.getResourceReader(DelegatorDownloadResourceManager.java:32)
       at com.atlassian.confluence.servlet.download.ExportDownload.getStreamForDownload(ExportDownload.java:37)
       at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload$StreamResultCallback.doInTransaction(ServeAfterTransactionDownload.java:140)
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127)
       at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.getStreamInTransaction(ServeAfterTransactionDownload.java:41)
       at com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload.serveFile(ServeAfterTransactionDownload.java:50)
       at com.atlassian.plugin.servlet.AbstractFileServerServlet.doGet(AbstractFileServerServlet.java:32)
      
      

        Attachments

          Activity

            People

            • Assignee:
              bswift Bob Swift [Bob Swift Atlassian Apps]
              Reporter:
              dpatterson Dwight Patterson
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: