2 Replies Latest reply on Jun 7, 2007 8:10 AM by bryn50

    Printing (html or PDF Files)

    bryn50 Level 1


      It might seem like a dumb question with an obvious answer, but how can I, from within a cfm script, send a html or PDF file to the printer (attached to the server).

      Task as Background to question - looks easy enough. Printing seems to be the snag:
      Generate a bunch of invoices as PDF. Print selected invoices that aren't going to be emailed on the big laser printer in the corner.

      Yes, I know about cfexecute, but can't find reasonable guidance on how to tell adobe reader (on the command line) to print a document. Seems to rely on a user clicking on file>print; not much info available about any command line options. Some possible lead in the fact that Windows seems to know how to tell Adobe Reader to print a pdf and then close. (right click on pdf file, select print option..)


      Clues anyone ?
        • 1. Re: Printing (html or PDF Files)
          Level 7
          One of the easiest solutions, if you can configure the software, is to
          create a watch directory. Many network aware printers and pdf tools can
          be configured to watch a specific directory and print any file put into it.

          To use cfexecute, I presume you would be looking at the printer driver.
          It possible has some kind of command line api that allows one to call
          it and tell it what to print.

          • 2. Re: Printing (html or PDF Files)
            bryn50 Level 1
            well I can cause acrobat reader to print a PDF file in a cmd window using:

            C:\Program Files\Adobe\Reader 8.0\Reader>acrord32.exe /p /h c:\33202_14485.pdf

            Obviously I can do that inside a cfexecute, but doesnt seem like an elegant solution to me. I need to print a bunch of files in a batch process.

            Can you tell me more about this idea of a watch directory, and what PDF utilities can be configured to use one ?
            Thanks,...