I'm trying to send PCL Escape sequences in Word with the PRINT field. Using the format {PRINT 27"&l2X"} is supposed to get me 2 copies, but I get only one...
The copy command is only honored if it is at the beginning of the job. If you are putting this in the middle, it will be ignored.
Try adding some printable text {PRINT 27"&l2X Copy=2"} to ensure that the print field is getting processed and sent (you'll see the Copy=2 where the command got processed).
I put some text following the command and the text is printing all right, but I still don't have 2 copies.
I tried it with a brand new Document with the PRINT statement at the very beginning and also with another brand new document with the PRINT in the header, Both printed the text, but only 1 copy.
If I print those document as files, I can see that Word is putting some PJL commands at the very start of them and one says [@PJL SET QTY=1]. The last PJL command is to enter PCLXL language. I can see my 2 copies command, including the simple text I wrote, but it doesn't seems to execute it.
Is it because the first PJL SET QTY overrides my PRINT statement ?? If so, how can I bypass that... in the meantime, I'm gonna try to enter some PJL commands via that elusive PRINT !!
I think I'm starting to get it...at last !! Just want a check if I'm right.
I open a brand new Document in Word. The first thing I do is insert the PRINT field code {PRINT 27"&l2X"}, followed by something like «Is there 2 copies ???». Now, if I print that document to a file via the «Print...» menu and read that file with Notepad, I see about 12-13 lines of PJL which I supposed are put there by the printer driver. Commands range from STRINGCODESET=UTF8 to DUPLEX=OFF, etc. They correspond to the various choices I can make in the print pop-up window.
The last of these line reads :
) HP-PCL XL;3;0;Comment Copyright(c) 1999 Microsoft Corporation
After that, the rest is unreadable but I can see the command that was put somewhere by the PRINT field code (which is PCL). As you said, PCL will never be rendered inside a PCLXL stream. Questions :
1- Is my interpretation is plausible ??
2- As I see, PCLXL is somewhat precompiled or pre-crunched by something. Is there any PCLXL command set out there that I would be able to «feed» the PRINT code field with (I'm not too confident about this one !!)
3- You suggested to use a PCL5 driver for the printer, I assume that this driver will permit me to use the «old» PCL Escape sequences in the PRINT code field.
4 Last, is there a program of some kind that exist that will allow me to «compile» that PCLXL and kind of «paste it» in that PRINT code field in Word.
Once again, thanks a lot and forgive my english (I'm a french speaking person).
1- Is my interpretation is plausible ??
Yes 2- As I see, PCLXL is somewhat precompiled or pre-crunched by something. Is there any PCLXL command set out there that I would be able to «feed» the PRINT code field with (I'm not too confident about this one !!)
No 3- You suggested to use a PCL5 driver for the printer, I assume that this driver will permit me to use the «old» PCL Escape sequences in the PRINT code field.
Yes (although I've no idea whether this will ultimately work to your satisfaction) 4 Last, is there a program of some kind that exist that will allow me to «compile» that PCLXL and kind of «paste it» in that PRINT code field in Word.
Not really - HP supply the JetLib library of C/C++ functions, but you couldn't use it very easily (if at all) within one program to paste things into a stream being compiled by another program (the driver), as the stream has to follow strict rules, and you would not be aware of just where and what the driver program was writing.
Thanks a lot DansDadUK, I'm going to get that PCL5 driver... and if ever I'm able to «plug» something in the PCL XL stream (cause I'll try !!), I'll let you know.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.