On this Page

    _printer (Output Configuration)

    (Merge only)

    The _printer set of functions give access to a variety of Merge output configuration settings. DocOrigin Merge allows one or more printer output configurations to be used at the same time. Each has a unique "printername" such as PDF or LJ4.

    Note that output configurations have both a "printername" and a "printertype". Several of the _driver routines use printername as a parameter. The printertype is a generic name for the general type of output (PDF, PCL, HTML, etc.) that may apply to several distinct printernames. For example your -config option might list multiple PDF related PRT files. Each would have a printertype of PDF but each would have a distinct printername such as PDF and PDF2. Each output configuration could have separate settings such as having one driver combine all documents into a single output file while the other creates individual files.

    The _printer functions are most likely used in the Ready to Print or Start Next Print Driver script events. When multiple output configurations are used, some of these functions allow you to control which will be "active" or "inactive" at any given time.

    Functions

    _printer.first()

    Return name of first active output configuration. See also _printer.next().

    _printer.getDocNum([printername])

    Return the number of documents printed to this output configuration.
    _printer.getDriver()

    Returns the printername of the current active output configuration.

    _printer.getPageCount([printername])Return the number of pages printed for the current document for the named (default current) output configuration.
    _printer.getTotalPageCount([printername], [bIncludeNumberedPages], [bIncludeUnnumberedPages])Return the total number of pages printed for the named (default current) output configuration. (As of 3.0.002.06) By default, bIncludeNumberedPages is true, and bIncludeUnnumberedPages is false. Typically, the unnumbered pages are for preamble material, separator pages, or terms and conditions pages. The numbered pages are typically the core of the document. By default, you get back the count of the numbered pages only.
    _printer.getOutputFile([printername])Return the name of the file that this output configuration is writing to.
    _printer.isDefined(printername)Is the named printer defined in this Merge run? true/false
    _printer.next()

    Return the name of next active output configuration. This assumes that _printer.first() has been called. Returns null if no further active output configurations have been specified.

    _printer.select(printername)Make this printername active, all others inactive.
    _printer.setActive(true|false[, printername])

    (As of 3.1.002.01) Make an output configuration active or inactive. Use "*" for printername to apply to all output configurations.

    _printer.setOption(name, value[, printername])

    Set printer-specific options. Typically overriding config PRT file settings. eg:
         _printer.setOption("Select_Arial", "\E(s1p10v0s0b16602T", "LJ4");
         _printer.setOption("spoolerDocName, "Invoice "+InvoiceNumber._value);

    _printer.setOutputFile(filename[, printername])Set the name of the file to write the output to.
    _printer.setPDFAllowAccess(true|false)Set the PDF 'Allow Access' permission.
    _printer.setPDFAllowChange(type)Set the PDF 'Change' permission. Options are Insert, Fields, Commenting, or All.
    _printer.setPDFAllowCopy(true|false)Set the PDF 'Allow Copy' permission.
    _printer.setPDFAllowPrinting(type)Set the PDF 'Printing' permissions. Types are Yes|HiRes, No, or LoRes.
    _printer.setPDFInfo(name, value)

    Set name/value data for the 'PDF Info' section. This is for informational purposes only.

    _printer.setPDFModifyPassword(password)Specify the PDF file modification password.
    _printer.setPDFOpenPassword(password)Specify the PDF file open password.
    _printer.addPDFAttachment(name[, description])Add an attachment to PDF attachments list for current document.
    _printer.clearPDFAttachments()Clear list of PDF attachments for current document.
    _printer.resetPDFAttachments()Init PDF attachments list from command line -attachment options for current document.