Printing to a Pre-printed Form 
Author Message
 Printing to a Pre-printed Form

In my application I need to print data onto a pre-printed form.  This
application is used at multiple locations and the printing will be done
on a variety of printers.  I have been populating fields on an Adobe
Acrobat form and sending that to a printer but in order to get the
fields lined up at each location, I manually move the fields around on
the adobe form.   So now I am ready to s{*filter*}the adobe document and try
something different.  Should I create a VB Form, place the fields on
there and do a .printform command?  If I do that, I am assuming that I
will run into the same printing problems.   Does anyone have any ideas?

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!

Thu, 24 Feb 2005 21:52:07 GMT  
 Printing to a Pre-printed Form
Printing in VB is not too tough.  You can literally set the CurrentX
and CurrentY position on the Printer object and then do Printer.Print
SomeString.  It will place that string exactly where you want it.

So, you could simply do a top-down approach to your form.  Start at
the top, print the title or whatever, and progress down the page
printing each line.  Just figure out exactly where on the page each
line should be printed and have a Printer.CurrentX=X and
Printer.CurrentY=Y pair of lines to set the print location in the
right spot.  If you set the Printer.Scalemode = 5, you can do it all
in inches.

If you need to toggle Bold, Underline, Font, Font Size, etc. you can
do all that with the Printer.FontBold=True-type commands.

It all takes a little effort to set up, but you can do it.


Now, if you want to get really tricky, try this.  Create your
pre-printed form in the Windows WordPad.  Set the text, fonts, etc. in
the pad as needed.  Wherever you want a field that can be modified,
use something that will be easy for VB to find, like "[Field1]".  Save
it as an RTF (Rich Text Format) file.

Now, in your program you open that pre-printed form in a RichTextBox
control.  Once it is open, you replace all instances of "[Field1]"
with whatever the text should be for that field.  Once all your fields
are filled in, you print the contents of the RichTextBox control
straight out to a printer.  The instructions for printing the contents
of a RichText control are in the VB6 help files.

The beauty of this second method is that, at any time, you can go into
WordPad and modify the basic file.  You dont have to go into the
program code to do it.

Fri, 25 Feb 2005 22:50:07 GMT  
 [ 2 post ] 

 Relevant Pages 

1. How to print on a preprinted form?

2. Printing to a pre-printed form

3. Printing to a pre-printed forms.

4. URGENT!!!: How to print to Pre-Printed Form

5. Can Crystal Report print a pre-printed form?

6. URGENT!! : How to print to Pre-Printed Forms

7. how to print in pre-printed invoice

8. Printing on pre printed stationery

9. Printing Preprint Forms ?

10. How to Print on PrePrinted Form (like invoice..)

11. application for pre-printed forms

12. Help on aligning pre-printed forms with NEC Pinwriter P2000


Powered by phpBB® Forum Software