Skip to main content
August 2, 2011
Question

Put a bar chart into a pdf file generated by ColdFusion

  • August 2, 2011
  • 1 reply
  • 2935 views

I'm using ColdFusion 8.0 running on a Linux server and a MySql db. I want to generate a pdf file that contains a table of info from the db and also a bar chart. The table is fine, but the bar chart isn't displaying. Here's my chunk of code for the chart:

<cfchart format="flash"
         yaxistitle="% yield"
         chartwidth="640"
         chartheight="480">
            <cfchartseries type="horizontalbar"
                           query="bar_info"
                           valuecolumn="col1"
                           itemcolumn="col2">                          
</cfchart>
</cfdocument>

<cfpdf action="write"
       source="hreport"
       destination="createreportPDF.pdf" overwrite="yes"/>
      
<cfpdf name="pdf" action="read" source="createreportPDF.pdf"/>

Any suggestions much appreciated. Thank you.

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 2, 2011

    I'd try format="jpg" instead of flash.

    August 3, 2011

    I've tried all the options I could find for chart format, which was flash, jpg, png and swf and none of them diaplayed in the pdf file

    Inspiring
    August 3, 2011

    Can you post a complete & self-contained reproduction case that demonstrates this not working?

    --

    Adam