On this Page

    -attachment

    (Merge only) (As of 3.1.001.25)

    Attach a file to the generated PDF output.

    Syntax

    -attachment filename [; description]

    The textual description is optional. If present, it will be displayed in pdf viewers such as Acrobat.

    Description

    For every document in the job PDF attachments list is reinitialized from -attachment options if any is set. Then this PDF attachments list is shared through all output configurations (drivers) defined.
    Multiple -attachment commands may be used to attach several files. Example:

    -attachment "C:/DocOrigin/User/Forms/myfile.txt;This is a sample description" 

    -attachment "$$F/anotherfile.txt;This is another file." 

    Scripting

    (Merge only) (Added in 3.1.002.01)

    There are such script functions to manage PDF attachments from script:

    • _printer.addPDFAttachment(name [, description]) - add an attachment to PDF attachments list for current document

    • _printer.clearPDFAttachments() - clear the list of PDF attachments for current document
    • _printer.resetPDFAttachments() - init PDF attachments list from command line -attachment options for current document

    Note that some of these functions make more sense on start next print driver event.

    See Also

    _printer (Output Configuration)