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

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), but I'm not sure.

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

1 {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:

1 2 3 4 5 {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:

1 2 3 4 5 6 7 8 9 {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:

1 2 3 4 5 6 7 8 9 10 11 12 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)

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

Status

Assignee

Bob Swift [Bob Swift Atlassian Apps]

Reporter

Dwight Patterson

Labels

None

Support Entitlement

None

Components

Fix versions

Priority

Minor