Simple examples
This section shows some simple examples of using pcl2afp. For more detailed examples, see More complex examples.
- To submit the sample PCL file
sample.pcl
supplied with InfoPrint Manager for AIX to the logical printer namedPserv-lp
, enter:enq -Pserv-lp -odatat=pcl /usr/lpp/psf/pcl2afp/sample.pcl
- To transform the PCL file
myfile
into an AFP data stream, and then submit it to the InfoPrint logical printer calledPserv-lp
, enter:pdpr -p Pserv-lp -x "default-printer-resolution=300" myfile
or
pcl2afp -r300 myfile | pdpr -p Pserv-lp
Note: You need to specify a resolution of 300 pels (default-printer-resolution=300) because the Pserv-lp printer routes jobs to a 4019 printer device. The 4019 is a 300-pel resolution printer and the default resolution for the pcl2afp command is 240 pels. - To transform the PCL file
myfile
into an AFP data stream, with an image that is 8 inches high and 5 inches wide, and write the result to a file calledmyfile.afp
, enter:pcl2afp -l 8i -w 5i -o myfile.afp myfile
or
pcl2afp -l 8i -w 5i myfile > myfile.afp
- To transform the PCL
myfile
file 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:pcl2afp -aIO1_MMR -r300 myfile | pdpr -X myafp.X -p lserv-lp
or
pdpr -X mypcl.X myfile -p Pserv-lp
where the attributes file namedmyafp.X
contains these settings:document-format=modca-p printer-name-requested=robin-lp
and the attributes file namedmypcl.X
contains these settings:document-format=pcl printer-name-requested=robin-lp image-output-format=io1_mmr default-printer-resolution=300
- Assume that the PCL file
myfile
uses theBarKode.pcl
font that is a PCL resource on a system namedmolly
. Also assume that the pcl2afpd daemon is running onrobin
, but you are logged in to the AIX or Linux system namedmolly
. To transformmyfile
into an AFP data stream, but not print it:pcl2afp -S robin -c -o myfile.afp BarKode.pcl myfile
The -c flag concatenates the two input files, with the file
BarKode.pcl
first, so that the two files are processed together. In this way,myfile
usesBarKode.pcl
as an inline resource. - Because the pcl2afp transform does not accept HP-GL/2 directly as input, you can use the -c flag to concatenate some sample PCL files that allow the HP-GL/2 file to be processed.
To transform the HP-GL/2 file
myfile.gl
into a MO:DCA-P data stream filemyfile.afp
, enter:For AIX or Linux
pcl2afp -o myfile.afp -c /usr/lpp/psf/pcl2afp/gl_before.pcl myfile.gl /usr/lpp/psf/pcl2afp/gl_after.pcl
For Windows
pcl2afp -o myfile.afp -c install_path\pcl2afp\gl_before.pcl myfile.gl install_path\pcl2afp\gl_after.pcl
The -c flag concatenates the three input files, making
myfile.gl
appear as a PCL file that includes HP-GL/2 commands. - To transform a PCL file into an IS/3 compliant afp output:
pcl2afp -is 3 -o output.afp input.pcl
- To create an FS45 overlay from a one-page PCL file named
my.pcl
and name the FS45 overlaymy.ovly
, enter:pcl2afp -a fs45.ovly -p1 my.pcl -o my.ovly
- To create an FS45 page segment from an existing PCL file named
logo.pcl
and name the FS45 page segmentlogofs45.pseg
, enter:pcl2afp -a fs45.pseg logo.pcl -o logofs45.pseg