Examples

This section contains examples of the d2afp transform:
  • To transform the ditroff file myfile into an AFP data stream file called myfile.afp, enter:
    d2afp myfile -o myfile.afp
  • To create an AFP data stream output file from the troff file doc.trf and print the output file using the InfoPrint logical printer servC-lp, enter:
    troff -Tafp doc.trf | d2afp | pdpr -p servC-lp

    In this example, the troff command searches the /usr/lib/font/devafp directory for the troff font and printer description files. The d2afp command also uses files in this directory.

    In the preceding example, the d2afp transform runs on the local system whether the printer, servC-lp is a local or remote printer.

    Note: You could also use this command to perform the same function:
    troff -Tafp doc.trf | pdpr -p servC-lp -odatatype=ditroff

    In this case, if the printer, servC-lp, is local, the d2afp transform runs on the local system; however, if the printer is remote, the d2afp transform runs on the remote system.

  • To print the ditroff file report on an InfoPrint printer named servD-lp, enter:
    pdpr -X ditroff.X report
    In this example, the attributes file named ditroff.X contains these settings:
    document-format=ditroff
    printer-name-requested=servD-lp