Previous Thread
Next Thread
Print Thread
Adjusting margins for laser forms #35202 05 May 22 03:17 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline OP
Member
OP Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Quote

I am setting up a laser printer today for a customer. I always have a problem changing the top and left margins for the 1500 forms. They have to be able to print correctly on the boxes. Any suggestions on how to make these adjustments?


It all depends on what style of printing you are doing and how precise it has to be. If the program was designed to work on a traditional dot matrix printer, then you are presumably using PASSTHROUGH=ON (essentially raw output), in which case the only options you have that mimic on a laser printer what you could do with a dot matrix (by adjusting the paper position) would be to use the LMARGIN and TMARGIN directives in the Printer Configuration/Init File. Those are limited to whole columns and whole lines though, so maybe not precise enough to position X's inside of little boxes. A related option, which would give you more control, would be to create a PREFIX file with PCL commands to set up the initial printer margins.

The more modern approach to Windows printing would be to use GDI Printing Directives. In that case you can position individual characters precisely, using directives like //TEXTOUT, //MOVETO, and you can shift the entire output horizontally or vertically using //XOFFSET and //YOFFSET in twips units. Plus you adjust the character spacing fairly precisely with the width parameter of the //SETFONT directive, the vertical spacing with the //SETVMI directive.

Most government forms these days are available as PDFs, in which case instead of putting physical forms in the printer, you could use the OVERLAY option in the PDFX module to merge your output with the form to create a consolidated PDF document. Or, another variation would be to scan the form, or otherwise convert the PDF version of it to an image format and then use the PREFIX mechanism to print the form image first and then the data on blank paper.

For more tips and details, I suggest the Forms Printing topic in the doc, which also contains a link to another thread on this form. You can also search this forum for keywords such as forms, margins, etc.


Re: Adjusting margins for laser forms [Re: Jack McGregor] #35227 11 May 22 02:17 PM
Joined: Sep 2002
Posts: 5,471
F
Frank Online Content
Member
Online Content
Member
F
Joined: Sep 2002
Posts: 5,471
A little late to the party here but here is the base GDI setup we use for our hcfa-1500 forms. It is a starting point then you can adjust the form vertically and horizontally as needed.

;---------------------------------------------------------------------------
;
; These Commands establish the basic form font and settings. DO NOT MODIFY.
;
//PASSTHROUGH,OFF
//ORIENTATION,PORTRAIT
//SETMAPMODE,TWIPS
//SETVMI,240
//SETFONT,120,COURIER NEW,FIXED_PITCH,ANSI_CHARSET,FW_NORMAL,FS_UPRIGHT,0,72
;
; The following commands effect minor horizontal and vertical adjustments.
; The units are twips (1440 to the inch).
;
; X-OFFSET moves the form LEFT and RIGHT. Postive -> <- Negative
; Y-OFFSET moves the form UP and DOWN. Postive=Down ^= Negative
;
//XOFFSET,200
//YOFFSET,600

If I want to add the form template to the output I add this command:

//IMAGE,%MIAME%\icons\beta\form1500.png,0,100,0,0,IMGF_STRETCH

It took a fair amount of voodoo to get this close enough for jazz... I couldn't find a form image available for use in the public domain so i wound up scanning one and using it. This also adds a fair amount of anomaly but it's what I settled on. I am willing to share my "form1500.png" file if you are interested.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3