0 Replies Latest reply on Oct 3, 2007 2:19 AM by Fmoorman

    Problem using CFDOCUMENT within a scheduled task

    Fmoorman
      I have a component that creates a report as a pdf with CFDOCUMENT. The component is pretty lengthy, it gets the data from a database, calculates a result with both line totals and a final total. It also adds images to the end of the pdf report.

      The procedure saves the pdf as a file, attaches the newly created file to a short email and sends it out using CFMAIL. The process used to be synchronous; however due to the time involved with creating a pdf with images we decided to make it asynchronous. (Now, we put the parameters into a table then run a scheduled task to read the parameters and create emails/reports every 15 minutes)

      The problem is that when creating the pdf report asynchronously, it appears the the html table is not created in the [df. each table row/table cell appears on a single line on starting the next line after the text hits the right margin. All of the data looks accurate, just no formatting.

      The component/function that creates the pdf was not modified and it still works properly with formatting if you use the synchronous way. The component does not use any application variables and only two session variables which both exist in the application.cfm file for the scheduled task. (One is for the datasource, and the other session variable is for the user authority level.)

      Does any one have an idea what might be causing this or has heard/seen this before? I can post some code, but it is pretty lengthy.

      We are running CFMX 7,0,2,142559 JVM: 1.4.2_12-b03

      Thanks,
      Frank