COZZI - Copy PDF to Printer (CPYFRMPDF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The COZZI - Copy PDF to Printer (CPYFRMPDF) command sends an existing PDF file located on the IFS to a network attached copies a stream file from the IFS to an output queue for printing on a Printer that supports PDF direct protocol. It doesn't matter what application created the PDF file nor does it matter where (PC or IBM i) it was created. COZTOOLS provide PDF output support with its CPYPRTF and CPYOUTQ commands, but so do some native IBM i Print functions, as well as Adobe Acrobat products, if the PDF is created on Windows or Mac.

The target printer must be *USERASCII, therefore this command will override the target printer device to DEVTYPE(*USERASCII). The copied PDF is stored on a normal OUTQ that must be connected to a PDF-compatible printer. Many HP and IBM printers are PDF compatible. NOTE: Native PDF support by a physical printer differs from being able to print PDF files using Adobe(R) Acrobat(R) software. Acrobat prints using the native operating system printer drivers--converting the PDF document to native printer language via OS printer drivers as needed. The IBM i operating system interfaces do not do this conversion. Instead the raw PDF file is sent to the physical printer via an OUTQ. The printer itself must support native PDF printing. Many (most?) printers today offer PDF print support.

Top

Parameters

Keyword Description Choices Notes
STMF PDF location and file name Path name Required, Positional 1
OUTQ Output queue Single values: *JOB
Other values: Qualified object name
Optional, Positional 2
Qualifier 1: Output queue Name
Qualifier 2: Library Name, *LIBL
TOFILE *USERASCII Print device file Single values: *COZTOOLS
Other values: Qualified object name
Optional
Qualifier 1: *USERASCII Print device file Name
Qualifier 2: Library Name, *LIBL
SPLFNAME SPOOL File name Name, PDFWRITER Optional
USRDTA User Data Character value, *SOURCE Optional
HOLD Hold *YES, *NO Optional
SAVE Save after printing *YES, *NO Optional
FORMTYPE Form type Character value, *STD Optional
COPIES Copies 1-255, 1 Optional
SPLFOWN SPOOL file owner *CURUSRPRF, *JOB, *CURGRPPRF, *JOBGRPPRF Optional
Top

PDF location and file name (STMF)

Specify the PDF file to be sent to the printer. The file must be located on the IFS and be specified with its fully-qualified path and file name. For example: STMF('/home/cozzi/report.pdf')

This is a required parameter.

PDF-file-and-path-name
Specify the fully qualified PDF file name to be printed.
Top

Output queue (OUTQ)

Specify the output queue where the PDF file is sent. A SPOOL file is created containing the PDF image and is stored on that OUTQ. It may be optionally moved to another OUTQ via the CHGPRTF command or via option 2 on the various WRKOUTQ panels.

Single values

*JOB
The output queue associated with the job running the command is used.

Output queue

name
Specify the name of any output queue where the PDF file is send (SPOOLed).
Top

*USERASCII Print device file (TOFILE)

Specify the print file name used to create the SPOOL file containg the PDF image. COZTOOLS provides one when TOFILE(*COZTOOLS) is specified. This is normally good enough. If you want more control, specify a user-specified *USERASCII printer file name for this parameter. The print file must be DEVTYPE(*USERASCII) and will be overridden to DEVTYPE(*USERASCII) by this command.

Print file

*COZTOOLS
The COZTOOLS-supplied COZASCPRN print file in library COZTOOLS is used. This file was created with DEVTYPE(*USERASCII).
name
Specify the name of the print file to use to create the SPOOL file. The print file is "forced" (overridden) to DEVTYPE(*USERASCII).
Top

SPOOL File name (SPLFNAME)

Specifies the SPOOL File Name used for the created SPOOL file. Use this parameter to name the SPOOL file that is created. Tip: When TOFILE(*COZTOOLS) is specified, use this parameter to clearly name the SPOOL file as it appears on the OUTQ.

PDFWRITER
If no SPLFNAME is specified, the SPOOL File is created with the name PDFWRITER.
name
Specify any valid SPOOL file name.
Top

User Data (USRDTA)

Specifies the User Data for the SPOOL file

*SOURCE
The program creating the SPOOL file (this command) is used as the USRDTA.
character-value
Specify the user data (USRDTA) value.
Top

Hold (HOLD)

Specifies whether to hold the SPOOL file or release it immediately.

*YES
The SPOOL file is held on the OUTQ.
*NO
The SPOOL file is in released status on the OUTQ.
Top

Save after printing (SAVE)

Specifies whether the SPOOL file is deleted after it is printed.

*YES
The SPOOL file is not deleted after it is printed.
*NO
The SPOOL file is deleted after it is printed.
Top

Form type (FORMTYPE)

Specifies the Type of Form used to print the PDF File.

*STD
The default forms type of *STD is used.
character-value
Specify any forms type to assign to the SPOOL file being created.
Top

Copies (COPIES)

Specifies the number of copies to print.

1
One copy is printed.
1-255
Specify a count of up to 255 copies to be printed.
Top

SPOOL file owner (SPLFOWN)

Specifies owner of the SPOOL file that is created. This parameter has a restricted list of options.

*CURUSRPRF
The current user profile is used.
*JOB
The user profile associated with the job running the command is used.
*CURGRPPRF
The current user profile's Group Profile is the owner.
*JOBGRPPRF
The user profile associated with the job is used to extract the name of that user's Group Profile. That group profile is used as the SPOOL file owner.
Top

Examples

None
Top

Error messages

Unknown
Top