Redirecting using Optio in a Smartselect
Create a 'Smart Select' document
Put in the code before of the document the following (taken partially from Save Spoolfile On Error look there for more explanations)
LET TmpIncomingSpool = PARAMETER("*",1) LET TmpIncomingSpoolName = "D:\archive\BusySpool\Busy_" & TmpIncomingSpool[1,WHERE("~",TmpIncomingSpool)->LENGTH(TmpIncomingSpool)] LET ignore = SYSTEM("COPY " & TmpIncomingSpool & " " & TmpIncomingSpoolName)
![]() |
make sure the path d:\archive\BusySpool\ exsists, change it to something you like without any spaces. Then MAP the file as you are used to. and put in a Flow Control if you like. Make sure to put a valid value in a variable called "OutputQueue" (put it in globals if you like.) Connect a (nearly empty) document to the flow control. and put in the 'code before' this code : |
LET StartAcrobatToPtrint = "c:\Progra~1\Adobe\Reader~1\Reader\AcroRd32.exe "& TmpIncomingSpoolName &" /T " & PrimaryInput.Header.OutputQueue LET ignore = SYSTEM(StartAcrobatToPtrint) LET ignore = SYSTEM("DEL " & TmpIncomingSpoolName)
This will start acrobat reader (check the path !) with the original pdf file and an output queue you found in the pdf somewhere. (check the acrobat reader manual for this feature)
make sure every queue you mention on this command line ( PrimaryInput.Header.OutputQueue
) is available on the eComIntegrate server and has the printer driver installed. (acrobat needs this).
If you want to do more stuff with the printout (like change paper bin's) or are not sure about the print queue's (and drivers) you need to use a different print program (e.g. ghostscript).
Redirecting only the print job
When you print the PDF directly without readng it with ecomintegrate, you do not need the copy the file first.
DOCUMENT "RedirectPDF" LET TmpIncomingSpool = PARAMETER("*",1) LET PrintQueue = "\\server\share" LET StartAcrobatToPtrint = "c:\Progra~1\Adobe\Reader~1\Reader\AcroRd32.exe /T "& TmpIncomingSpool &" " & PrintQueue LET ignore = SYSTEM(StartAcrobatToPtrint) // put more processing here END DOCUMENT
Printing from Acrobat
From the Acrobat reader 7.x manual :
AcroRd32.exe /t path "printername" "drivername" "portname"
Initiates Adobe Reader and prints a file, whose path must be fully specified, while suppressing the Print dialog box.
The four parameters of the /t option evaluate to path, printername, drivername, and portname (all strings).
- printername � The name of your printer.
- drivername � Your printer driver�s name, as it appears in 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.