Otherwise, you could set your PDF printer to always save to the same directory and then use a simple(?) AutoIt(Hk) script to watch for any new PDFs and send them onto the machine with the printer by either having the print machine watch a directory, print then delete anything that appears or by injecting into it's print queue directly.-4wd
And that is something I have already mentioned. I just am not that experienced with Ahk and do not know much about Autoit. I know python but WIn32 automation is not something I have done at all but I will check it out, so I will probably do it in Python.-kartal
You still haven't said what type of machine the Canon printer is connected to but providing it's a Windows box, here's a solution:
In the following
PDFPrinter refers to the PC generating the PDFs and
RealPrinter refers to the PC with the Canon printer.
Download
FileNotify and install it on both machines following the directions on the page - very simple.
On the PDFPrinter run the fnAdmin.exe command, it will ask to open the FileNotify parameter file, (default FileNotify.txt in the FileNotify directory), select Open. On the next window select Add.
Select as below filling in the appropriate paths as necessary:
Free Pdf server?On the RealPrinter run the fnAdmin.exe command, it will ask to open the FileNotify parameter file, (default FileNotify.txt in the FileNotify directory), select Open. On the next window select Add.
Select as below filling in the appropriate paths as necessary:
Free Pdf server?The PrintDelete.cmd resides in the FileNotify directory and is as follows:
rem AcroRd32.exe /t path printername drivername portname
rem Initiates Acrobat Reader, prints a file while suppressing
rem the Acrobat print dialog box, then terminates Reader.
AcroRd32.exe /t "%1" "Canon Super Printer" "Canon Super Printer Driver" "USB001"
del "%1"
NOTE: You need Acrobat Reader installed on the PC that's to do the real printing - the reason is simple, it's almost impossible to find any program that will print a PDF from the command line, (GhostScript may but I'm not going to bother installing it find out.)
Parameters for AcroRd32.exe, (or AcroBat), are as follows:
The four parameters of the /t option evaluate to:
path, printername, drivername, and portname (all strings).
path - the path and file to print.
printername - The name of your printer.
drivername - Your printer driver 's name. Whatever appears in the Driver Used box when you view your printer 's properties.
portname - The printer 's port. portname cannot contain any "/" characters; if it does, output is routed to the default port for that printer.
If using Acrobat,substitute Acrobat.exe in place of AcroRd32.exe in the command lines.
Last step, fire up services.msc and start the File Notification service.
The theory goes:
a) PDF is generated into the folder watched by that PC.
b) FileNotify performs the action which is to copy it to a shared directory on the other PC for printing.
c) The new PDF triggers FileNotify on the printing PC which calls PrintDelete.cmd
d) PrintDelete.cmd prints the PDF using AcroBat, (or Reader), and then deletes the file.
e) Job Done.
The theory is sound but I haven't tested it.
You, of course, have to make sure the folder is accessible for the PDF to be copied to as there's no error checking if it doesn't.