Herunterladen Inhalt Inhalt Diese Seite drucken

LVBPrint PrintMulti Handbuch Seite 47

Inhaltsverzeichnis

Werbung

Hier ein Ausschnitt aus dem Script, das zeigt wie aus den Parametern eine Kommandozeile für den
Aufruf von GS gebastelt wird:
compatibility = procEnv("GS_COMPATIBILITY")
pdfsetting
= procEnv("GS_PDFSETTINGS")
fixpapersize
= procEnv("GS_FIXPAPERSIZE")
debugoutput
= procEnv("GS_LOGFILE")
extraparams
= procEnv("GS_EXTRAPARAMS")
pdfmode
= procEnv("GS_PDFMODE")
'Build command line file for ghostscript
paraFileName=createGuid()+".txt"
Set fso = CreateObject("Scripting.FileSystemObject")
'Base cmd line
cmdLine = "-q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
'PDFMODE has priority over some other settings
if ucase(pdfmode) = "PDF/A" Then
pdfaxFile = createGuid()+".ps"
ReplaceEnvironment "%PM_INSTALLPATH%\PDFCreation\PDFA_def.ps", pdfaxFile
cmdLine = cmdLine + "-dPDFA -dUseCIEColor -sProcessColorModel=DeviceCMYK "
Else
if compatibility <> "" Then cmdLine = cmdLine +
CompatibilityLevel="+compatibility+" "
if pdfsetting
if fixpapersize
if extraparams
End if
Automatischer Mailversand:
Der Mailversand wird im Script mit dem leistungsfähigen Tool "Blat.exe" (www.blat.net). Es gibt
aber sicher auch andere Tools für den Mailversand per Kommandozeile, die es erlauben einen
Anhang mitzuschicken.
; to test mail sending, uncomment the three following lines
!GS_SENDMAIL=1
_DstFile=%TEMP%\#P_#C.txt
WriteTextToFile=$(#(!GS_SENDMAIL)I;1;=;#(_DstFile)I;;?)
; Options used to send the printed file as attached pdf file to an address
; defined in the example document
!GS_MAILFILE=%PM_INSTALLPATH%\PDFCreation\mailbody.txt
; activate for a log file which shows the output of blat, which is used for
; mail sending
!GS_MAILLOGFILE=%TEMP%\mail.log
;server and login data
!GS_MAILSERVER=xxxxxx
!GS_MAILSERVERUSER=xxxxxxx
!GS_MAILSERVERPASSWORD=xxxxxxxx
!GS_MAILREPLYADDRESS=info@lvbprint.de
; set the name to be used in the script
!GS_TEXTFILE=#(_DstFile)I
Die Server und Logindaten sind in der PrintMulti.ini konfiguriert.
Zieladdresse und Betreff werden im Word-Dokument übergeben (siehe SendMailExample.doc).
<> "" Then cmdLine = cmdLine + "-dPDFSetting=/"+pdfsetting+" "
<> "" Then cmdLine = cmdLine + "-sPAPERSIZE="+fixpapersize+" "
<> "" Then cmdLine = cmdLine + extraparams + " "
"-
47

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis