Skip to main content

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.
I have no experiences with the W2 form in particular. But in general I would say, filling a preprinted form is best done on a individual field by field basis.
To accomplish this, you should use the WINPRINT-SET-CURSOR opcode with absolute coordinates in inches. This will ensure your print comes at the same position regardless of the printer you use.

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.
I have no experiences with the W2 form in particular. But in general I would say, filling a preprinted form is best done on a individual field by field basis.
To accomplish this, you should use the WINPRINT-SET-CURSOR opcode with absolute coordinates in inches. This will ensure your print comes at the same position regardless of the printer you use.

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.
I have no experiences with the W2 form in particular. But in general I would say, filling a preprinted form is best done on a individual field by field basis.
To accomplish this, you should use the WINPRINT-SET-CURSOR opcode with absolute coordinates in inches. This will ensure your print comes at the same position regardless of the printer you use.

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.
I have been trying to print on a form, the new 941, and I am trying to use the WPRTUNITS-CENTIMETERS-ABS to make sure that the text prints the same on all printers. However, when I execute the following code on different printers, my text ends up printing in different locations. Its generally only off about 1 character, on some printers its higher and others is over to the right and others is down 1 and over to the left.


INITIALIZE WPRTDATA-DRAW.
MOVE 5 TO WPRTDATA-DRAW-START-X.
MOVE 5 TO WPRTDATA-DRAW-START-Y.
MOVE WPRTUNITS-CENTIMETERS-ABS TO WPRTDATA-DRAW-DNITS
CALL "WIN$PRINTER" USING WINPRINT-SET-CURSOR WINPRINT-DATA GIVING
PR-CALL-RESULT
MOVE EIN-1 TO PRINT-REC
WRITE PRINT-REC BEFORE ADVANCING 0 LINES

I have printed on an Hp2100(pcl6), Hp2420(pcl6), Hp 6p(pcl5) and Hp4600(pcl6) and my text is in different locations on each of these printers.

I'm setting the font WPRTFONT-COURIER-12-COMP and using version 6.1.0 of the runtime.

Does anybody have any ideas why this would be?

Thanks,

scott

[Migrated content. Thread originally posted on 25 November 2004]

I was wondering if anyone out there has sample code of formatting a W2 form, either the 2-up preprinted form, or the 4 up form that prints on blank paper. I am inexperienced using the Win$printer capabilities of columns, fonts, ete, but I see where this would be great for a form like this, if the programmer gave the operator ability to shift the form slightly for better alignment.
This sounds weird. As you apparently have this reproduced at small scale I'd suggest you report it to Tech Supp.
The problem here of course is to be able to reproduce on multiple printers as do you, but as it seems quite consistent, I woul believe this should be possible.