0

ColdFusion 9 on Win2003. I am building PDF files into a directory. I, then, loop over "spool" directory and trying to print all files in it. CF prints, but ... it skips over some files. I read about similar problem here: coldfusion - cfprint issues with large spool files and trying to implement sleep() solution for printer to catch up. It does not work :-( as am still missing some files Here is what I have:

<cfset spool_dir="D:\SPOOL\">    
<cfdirectory action="list" name="files" directory="#spool_dir#">
    <cfoutput query="files">
        <cfif files.currentRow MOD 5 EQ 0>
            Current document number: #files.currentRow# -- Sleeping, shhhhh ...<br>
            <cfset sleep(5000)>
        </cfif> 
        <cfprint type="pdf" source="#name#" printer="\\http://10.0.99.99\DC">
    </cfoutput>

Can anyone suggest something else to try?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
epipko
  • 473
  • 5
  • 18
  • 1
    When it turns out something is a localized issue (i.e. problem specific to one environment only and the answer is unlikely to benefit others) you can always just delete the thread. – SOS Aug 13 '19 at 18:35

1 Answers1

1

It appeared that we had a faulty printer. I sent the same code to a different printer and it printed all documents.

epipko
  • 473
  • 5
  • 18