Spooler 2017

PrintOddEvenAll

<!-- Copyright (c) 2019 ActivePDF, Inc. -->
<!-- ActivePDF Spooler 2017 -->
<!-- Example generated 07/18/19  -->

<%
Dim strPath, results

strPath = Server.MapPath(".") & "\"

' Instantiate Object
Set oSP = Server.CreateObject("APSpooler.Object")

' Use the PrintJobProfile object to set specific printer settings
' for the print job if the default options are not what is needed.
Set oPJP = oSP.PrintJobProfile("SettingsOne")

oPJP.BinSource = 15
oPJP.Collate = false
oPJP.ColorMode = 2
oPJP.DPI = 300
oPJP.Duplex = 1
oPJP.FormName = "SampleForm"
oPJP.Nup = 0
oPJP.Orientation = 1
oPJP.PaperSize = 1
oPJP.PrinterName = "Microsoft Print to PDF"
oPJP.PrintOddEvenAll = 3
oPJP.ProfileName = "SettingsOne"
oPJP.Scaling = 1
oPJP.CustomScaling = 95.0
oPJP.TrueTypeOption = 3

' File specific settings
oSP.Copies = 1
oSP.PageRange = "1-2,4"
oSP.PrintAnnotations = true

' Print directly to a printer. Leave first parameter blank for default printer
Set results = oSP.PrintFileCustom(oPJP, strPath & "5pageLI.pdf", "")
If results.Status <> 0 Then
  ErrorHandler "PrintFileCustom", results, results.Status
End If

' Release Object
Set oPJP = Nothing

' Release Object
Set oSP = Nothing

' Process Complete
Response.Write "Done!"

' Error Handling
Sub ErrorHandler(method, oResult, errorStatus)
  Response.Write("Error with " & method & ": <br/>" _
    & errorStatus & "<br/>" _
    & oResult.details)
  Response.End
End Sub
%>

Copyright © 2019 ActivePDF, Inc