coldfusion9 --- <cfprint> skips files

55 views Asked by At

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?

1

There are 1 answers

0
epipko On BEST ANSWER

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