Description

The ps2afp command and its alias, the pdf2afp command, transform a PostScript or Portable Document Format (PDF) data stream file into an AFP data stream file.

The ps2afp and pdf2afp commands use one of these processing engines:

  • Adobe PDF Print Engine (APPE), which converts PDF only, at a higher quality and speed.

  • Configurable PostScript Interpreter (CPSI), which converts both PS and PDF input.

  • Artifex GhostPDL (AGSPDL), which converts both PS and PDF input.

You can choose between these three processing engines by using the -pdfproc parameter, when transforming PDF input.You can choose between CPSI and AGSPDL by using the -psproc parameter, when transforming PS input.

The PSF DSS runs the ps2afp command automatically whenever:

  • InfoPrint Manager identifies the format of a document in a print job as PostScript or PDF.
  • You use the pdpr command to specify document-format=postscript or document-format=pdf with the -x flag or in an attributes file.
  • You specify a data type of -odatatype=ps or -odatatype=pdf with an AIX print command (enq, lp, or qprt) or with the lprafp command.

If you specify multiple values of the same flag, ps2afp uses the last value specified, except for the -F, -g, and -p, flags. ps2afp concatenates multiple values of the -F flag from left-to-right (first entered to last entered). Multiple values of the -g and -p flags are accumulated and the pages identified for printing are printed in normal numerical sequence, regardless of the order you specify.

When using the ps2afp or pdf2afp command, you can specify an optional input file name. If you do not specify an input file name, ps2afp reads standard input. The output file name is also optional; if you do not specify one, the ps2afp command writes the results to standard output. Output from the ps2afp and pdf2afp transform contains binary encoded data that is not recognized by standard output devices such as an IBM AIX or Linux terminal session or a Microsoft Windows Command Prompt Window. For these standard output devices if an output file name is not specified, standard output should be redirected. For more information about redirecting output using either the greater than symbol (>) or the pipe symbol (|), see your operating system help or reference.

You can use the ps2afp command to specify both staple and punch finishing options.

For more information about these staple and punch options, see “Stapling and punch options available from the ps2afp transform” in the RICOH InfoPrint Manager for AIX: Procedures, RICOH InfoPrint Manager for Linux: Procedures, and the RICOH InfoPrint Manager for Windows: Procedures. You should consider these situations about the flags you can specify with the ps2afp or pdf2afp command:

  1. When you run ps2afp or pdf2afp as a standalone transform, flags can appear anywhere on the command line with or without a blank in the flag and value pair.

    When you specify ps2afp transform flags with the other-transform-options attribute, any string containing a blank must be surrounded by single quotes.

    Do not use a blank between the flag and the value when you specify ps2afp transform flags with an AIX print command or with the lprafp command.

  2. When you specify flags with the ps2afp or pdf2afp command, the command echoes them back to your display along with the settings for the flags. To suppress the command echoing, enter the -q (quiet) flag along with the ps2afp or pdf2afp command.
  3. The PostScript or PDF file can contain the commands letter and legal. If these commands are present in the PostScript or PDF file, you might not get what you expect due to the interaction of the letter and legal commands with the -l and -w flags of the ps2afp or pdf2afp command.
  4. The order in which ps2afp uses PostScript and PDF options is as follows:
    1. The PostScript program commands letter and legal, if they are present.
    2. Any options you specify on the command line with the ps2afp or pdf2afp command (for example, -r300), including values contained in the customized configuration file you specify with the ps2afp -C or pdf2afp command. If you specify the same option more than once, InfoPrint Manager uses the last value.
    3. Values contained in the configuration file, ps2afp.cfg, in the current directory, if you invoked ps2afp or pdf2afp directly. If you invoked ps2afp indirectly by requesting enq -odatatype=ps, or enq -odatatype=pdf, ps2afp ignores any configuration files in the current directory, and proceeds to step 4.4.
    4. Values contained in the ps2afp.cfg file in the user's home directory.
    5. Values contained in the default ps2afp command configuration file:
      For AIX or Linux
      /usr/lpp/psf/ps2afp/ps2afp.cfg
    6. Values contained in the customized configuration file you specify with the agspdld -C,ps2afpd -C, or apped -C command.
    7. Values contained in the default apped, agspdld, or ps2afpd daemon configuration file:
      For AIX or Linux
      /usr/lpp/psf/ps2afp/ps2afpd.cfg
      /usr/lpp/psf/ps2afp/apped.cfg
      /usr/lpp/psf/ps2afp/agspdld.cfg
    8. Values contained in the apped.cfg, agspdld.cfg, or ps2afpd.cfg file when ps2afpd was started.
    9. The defaults that are built into apped.cfg, agspdld.cfg, or ps2afpd. These defaults are the same as the defaults for the ps2afp flags, except that the default output type (-a flag) is an IM1 uncompressed image.
  5. The position of PostScript or PDF data on the page depends on the interaction of the -l and -w flags, the -x and -y flags, and the form definition you use. In general, to position data on the page,
    • Use -l and -w to set the physical page dimensions.
    • Use a form definition that specifies zero vertical offset and zero horizontal offset (for example, F100S, F100D, or F100T) or specify X and Y offsets of 0 when you submit the print job.
    • Use -x and -y to avoid any areas that your printer cannot print.
  6. You can specify the ps2afp flags and values with the ps2afp or pdf2afp command, or with enq -o, lp -o, qprt -o, or or lprafp. You can also specify equivalent attribute values with the -x flag or in an attributes file with the pdpr command.

For more information about the ps2afp and pdf2afp transforms, see “Working with Transforms” in the RICOH InfoPrint Manager: Procedures manual that is appropriate for your operating system.