Examples
- To submit the PostScript file
sample.psto the logical printer namedmolly-lp, enter:For AIX
enq -Pmolly-lp -odatat=ps /usr/lpp/psf/ps2afp/sample.ps
For Windows
pdpr -pmolly-lp install_path\ps\sample.ps
- To transform the PDF file
myfile1into an AFP data stream, and then submit it to the InfoPrint logical printer calledrobin-lp, enter:pdpr -p robin-lp -x "default-printer-resolution=300" myfile1
or
pdf2afp -r300 myfile1 | pdpr -p robin-lp
Note: You need to specify a resolution of 300 pels (To transform the PostScript filedefault-printer-resolution=300or-r300) becauserobin-lproutes jobs to a 4019 printer device. The 4019 printer is a 300-pel resolution printer, and the default resolution for the pdf2afp command is 300 pels.myfile2into an AFP data stream, with an image that is 8 inches high and 5 inches wide, and write the result to a file calledmyfile2.afp, enter:ps2afp -l 8i -w 5i -o myfile2.afp myfile2
or
ps2afp -l 8i -w 5i myfile2 > myfile2.afp
- To transform the PostScript file
myfile2into an AFP data stream, creating a compressed IO (IOCA) image (the default image type for the ps2afp command), and piping the result to the pdpr command to submit the file to the InfoPrint logical printer calledmolly-lp, enter:ps2afp myfile2 | pdpr -p molly-lp
You can get the same result without piping (that is, using pdpr directly) by entering:
pdpr -p molly-lp myfile2
- To transform the PDF
myfile1file into an AFP data stream in 300-pel resolution, as an IO1_MMR image, and send the result to the printer with the pdpr command, enter:pdf2afp -aIO1_MMR -r300 myfile1 | pdpr -X myafp.X
or
pdpr -X myps.X myfile1
where the attributes file namedmyafp.Xcontains these settings:document-format=modca-p printer-name-requested=david-lp
and the attributes file namedmyps.Xcontains these settings:document-format=pdf printer-name-requested=david-lp image-out-format=io1_mmr default-printer-resolution=300
- Assume that the PostScript file
myfile2uses the BarKode.pfa font that is a PostScript resource not installed for use by the ps2afpd on an AIX or Linux system namedrobin. Also assume that the ps2afpd daemon is running onrobin, but you are logged into the AIX or Linux system namedmolly. To transformmyfile2into an AFP data stream, but not print it:ps2afp -S robin -c -o myfile2.afp BarKode.pfa myfile2
The -c flag concatenates the two input files, with the file
BarKode.pfafirst, so that the two files are processed together. In this way,myfile2usesBarKode.pfaas an inline resource. - To create an FS45 overlay from a one-page PostScript file named
my.psand name the FS45 overlaymy.ovly, enter:ps2afp -a fs45.ovly -p1 my.ps -o my.ovly
- To create an FS45 page segment from an existing PostScript file named
logo.psand name the FS45 page segmentlogofs45.pseg, enter:ps2afp -a fs45.pseg logo.ps -o logofs45.pseg
- To transform a PostScript file into an IS/3 compliant afp output:
ps2afp -is 3 -o output.afp input.ps
- To transform an input file using lzw compression:
ps2afp -cmplzw -o output.afp input.ps
- To transform a PDF file with the APPE processor:
ps2afp -pdfproc appe -o output.afp input.pdf