There is no PCL command to change the dpi of the printer. But there is a PJL command for it. PJL is part of PLC but is a little diffrent.
Here is the PJL command for changing the dpi from the HP site:
----------------
Resolution
Ec%-12345X@PJL DEFAULT RESOLUTION=300, 600 or 1200 ( depending on the printer)
Ec%-12345X
NOTE: This code function is not supported on HP LaserJet 4L and 4ML printers.
NOTE: The HP LaserJet 2100, LaserJet 4000, LaserJet 5000, and LaserJet 4050 printers support 1200 dpi. The HP LaserJet 8000 and LaserJet 8100 printers support HP FastRes 1200.
----------
Basicly what you want it to look like in your program is this:
Ec%-12345X@PJL <LF>
@PJL DEFAULT RESOLUTION=600 <LF>
Ec%-12345X
you need to have a <LF> "Line feed" at the end of each line except for the last line to get it to work.
This is how it looks in the language CQCS that I write in.
Writefile(L_FILE_NAME,"%s%s%s%s%s",
"<033>%-12345X@PJL","<LF>",
"@PJL DEFAULT RESOLUTION=600","<LF>",
"<033>%-12345X"
This also might set the printer to 600 as a default dpi so you might want to set it back to 300 at the end of the program