-
-
Save anonymous/b8cc0e5c6bc316b3ccd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set PDFCreator = Wscript.CreateObject("PDFCreator.clsPDFCreator", "PDFCreator_") | |
With PDFCreator | |
ReadyState = 0 | |
.cStart "/NoProcessingAtStartup" | |
.cOption("UseAutosave") = 1 | |
.cOption("UseAutosaveDirectory") = 1 | |
.cOption("AutosaveFormat") = 0 | |
.cOption("AutosaveStartStandardProgram") = 0 | |
DefaultPrinter = .cDefaultprinter | |
.cDefaultprinter = "PDFCreator" | |
.cClearcache | |
.cPrinterStop = false | |
.cOption("AutosaveDirectory") = WScript.Arguments(1) | |
.cOption("AutosaveFilename") = WScript.Arguments(2) | |
.cPrintfile cStr(WScript.Arguments(0)) | |
c = 0 | |
Do While (ReadyState = 0) and (c < 120) | |
c = c + 1 | |
Wscript.Sleep 250 | |
Loop | |
.cDefaultprinter = DefaultPrinter | |
.cClearcache | |
WScript.Sleep 200 | |
.cClose | |
End With | |
Public Sub PDFCreator_eReady() | |
ReadyState = 1 | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment