Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PCL FILES
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Miscellaneous
Thread ID:
00252029
Message ID:
00252910
Views:
10
>John:
>thank you for your respond. This is the situation: we are using a VFP
>3.0 application to process our clients' data. The application allow
>user to produce a insurance application form for each client to fill
>out. We already have some information on clients in our dbf file, we
>would like to use the data in our system and fill in part of the form
>before we send the form out to our clients. Because the form is stored
>in the system in DCX or PCX format, I don't know how to bind each field
>to the image file. Please let me know if you can help me. Thank you.

There's no way to bind output to a PCL file - it's a print output. What you need is either a forms management package, or you need to take a different approach to producing your output.

What I've done in the past is to create laser pritner macros of standard forms - a macro is a set of commands that can be used to insert a pre-formatted print image into output without having to resend the entire image each time the macro is referenced. I use this technique to prepare invoices on our in-house order processing system - we pre-load the invoice form layouts for each company to the laser printer memory as permanent macros; we then print our invoices by creating the invoice detail for a page, and then at the end of the page, send the laser pritner the command to overlay the desired form layout.

We do not do this using report writer; we have the printer defined to the system using the Windows Generic/text only printer driver, and then send our output to the printer programmatically, inserting the necessary printer commands for formatting and positioning ourselves.

We create the laser macros using a form management program which takes care of creating laser macros (we use Corel's InForms to prepare the page layout and save the form as a permanent macro to a file.) The files containing the macro are uplaoded to each printer every time the printer is powered down or reset - while these are 'permanent' macros, they go away whenever the printer memory is cleared.

The advantage here is that the invoices are printed much faster, since only a small amount of text is sent for each invoice, rather than a complex graphic image. this is very important for our application, since we print to remote locations.

Caveat - this technique will not work unless you are careful to load the macros on the printer - a printer that does not have the laser printer macros loaded won't prodcue the output you want. it also limtis portability of your printing routines, since you can only print on devices that 91) have enough memory to hold the macros you wan tot save and (2) are comaptible with the PCL command language level you use. In our case, we produce out macros to be compliant with the version of PCL supported by the HP laserJet series II printers, which is a small subset of the current PCL 6 and PCL 7 language. Almost everything that is HP laser printer compatible will accept the PCL Level 2 language that originated with the Series II printers, but it limits the resolution and may not allow some advanced features of current printer modesl to be used.

Getting this to work from a report form is possible; in our case, we decided that ist was easier to not rely on the report writer and do our own formatting and positioning, printing to a file which we then queue to the appropriate printer using the CopyFile() API call (I have a FAQ entry on how to copy a file to a printer port using the COpyFile() API here on UT.)

>sherry
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform