How to create a PCL file from MS word

How to create a new PCL file, similar to an existing MS doc. I have an MS doc template and replacing it with actual data. I need to achieve the same PCL format (create a PCL file as a template and replace it with the actual value from the database and send it to fax).

+4
source share
5 answers
  • install new printer
  • when prompted for a port, create a new port such as "Local Port"
  • as the port name, enter some file name, for example. c:\temp\print.pcl
  • select some PCL compatible printer, for example. HP LaserJet 4, or whatever your fax is compatible

When you print on this printer, Windows will write the output to this file.

Many programs allow you to redirect print to a file; in this case, you can select a different file name for each print job. A.

+7
source

If you are trying to generate an actual template (PCL Macro) to combine with data, you will need to generate PCL output using the PCL driver and convert it to a PCL macro.

A typical situation is that you have an overlay loaded on the printer, and data from the host system (Unix, AS / 400, etc.) sends data overlaid on top of the overlay. We do this a lot for customers who are switching from a host application, a dot matrix printer, pre-printed forms → the same host application, a laser printer, and blank paper.

Generate output using print to file using the standard PCL driver (the HP LaserJet 5 and 4000 are the ones I have been most successful with in terms of using these PCL files on other manufacturers devices). After that you will have to convert to a PCL macro. This is a special PCL file that does not contain specific elements, such as formfeed, etc., basically any command that will lead to the exit of the page. It also contains codes that define it as a macro and give it an identifier.

Created

aOnce you can submit your standard text using an escape sequence to invoke the form.

& f # y3X, where # is the macro identifier (it can also be & f # y2X, & f # y4X depending on your needs)

You can convert these files yourself if you have experience with PCL; however, I recommend that you stick with some of the tools that are there. Some of them include:

  • Lexmark custom printer driver (I usually use T616, you will find the option you need on the "Customization" tab).
  • HP Forms and Font Manager
  • PCLWorks (view PCL, also converts image formats to PCL macros)

Another trick is sometimes added to the startup code. This is not a problem if you have control over the host application, and it allows you to enter control codes. If, however, you cannot use the shell script on Unix, the workstation setup object on OS / 400, or even use the separator sheet function in the Windows printer queue to insert commands (you need to use the @F command).

You can check this link. Macros PCL has a whole section: HP PCL Reference Guide

Hope this is what you are looking for. It can be tricky. If you need more information, write a comment in this post and I will add additional, detailed information.

+5
source

I found a simple solution and it works. convert .doc tamplete file to PCL using a tool (available online). open it in edit plus and learn ... I relize, I can change it according to my need. if you check this, you will see that each chaser has its own position. Example: p0Yp796Y * p1582Xn - means charector n in position (x axis 1582 and y axis 796) on the screen. so now I can change something, add a new object, line, etc. depending on my need. I know it is tiring, but it works for me ....

+1
source

You can create PCL with FOP.

If you can work with the docx format, docx4j can use FOP for output.

(If you must work with .doc, docx4j has a rudimentary transformation using poi hwpf)

+1
source

PCLWorks comes with Img2PCL.exe. Img2PCL converts JPG or TIFF images to macros for logos, signatures, overlay forms, etc. This is 89 US dollars. And also comes with PCLCodes for demonstrating PCL in readable English. And, it is used as a training tool for PCL. www.pclworks.com

+1
source

Source: https://habr.com/ru/post/1276851/


All Articles