Previous Thread
Next Thread
Print Thread
How to convert a DOC file to a PCL Macro #1499 15 Jun 10 08:28 PM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Offline OP
Member
OP Offline
Member
S
Joined: Jun 2001
Posts: 713
Does anyone know of an "easy" way to convert a Word DOC into a PCL4 or PCL5 Macro? The resulting macro will effectively be a fill-in-the-blanks form. The macro cannot have any PCL Resets in it and I imagine it also should not contain any Printer Job Control (PJL) commands.

The method I am currently using is:

1. Print the DOC file to a special Windows printer that I created which uses the LaserJet 5 driver and which has options to use Raster graphics (instead of HP/GL2 graphics), substitute True Type fonts with Device Fonts, and disable advanced printing features and optimization. Instead of printing to this logical printer (which does not physically exist), I print to a file.

2. Since the resulting file includes PJL code and two PCL Reset commands, I run that print file through a BASIC program which replaces the unwanted code with binary zeros. This program also prepends code that defines the file as a PCL macro, assigns it a unique ID, and does a PUSH to preserve the current cursor location. It also appends code to POP back to the saved location, ends the macro, and makes it permanent.

Apart from the fact that I'm not sure it's proper to have a PCL macro that starts with a lot of binary zeros (i.e., after the prepended code), when I test the macro, nothing I do lets me overlay it. Regardless of whether I execute it, call it, or initiate a form overlay, the fill-in-the-blanks text always ends up on a separate page from the form.

Does anyone know of a better way to do this? I have dozens of DOC files that each need to be converted into a PCL macro.
confused

Re: How to convert a DOC file to a PCL Macro #1500 15 Jun 10 11:50 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
It has been a long time since I've done anything along those lines, so I probably don't know anything relevant, but my suspicion is that there's no fundamental problem with your approach. (In other words, it's just an overlooked detail that is causing the form feed - if not an explicit FF byte, then something that has that as a side effect.) As for the binary zeroes, it may or may not be an issue, but you could probably change them to spaces to eliminate any doubt. (Presumably they are followed by PCL positioning commands prior to actual output, so that the effect of the spaces is naught.)

Re: How to convert a DOC file to a PCL Macro #1501 16 Jun 10 09:17 AM
Joined: Jun 2001
Posts: 713
S
Steven Shatz Offline OP
Member
OP Offline
Member
S
Joined: Jun 2001
Posts: 713
Thanks, Jack. It helped to be assured that I was on the right track. You were correct. There was a trailing Form Feed just before the final PJL code. Once eliminated, the overlay process worked! I threw myself off the trail earlier due to the profusion of X'0C' (formfeed) characters mixed in with the raster graphics. BTW: binary zeros in PCL code seem to work just as well as spaces.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3