Dot Matrix Printing on non-standard form

Dot Matrix Printing on non-standard form

Postby cdmmaui » Wed Jan 30, 2013 6:18 am

Hello,

I continue to run in to problems when printing a non-standard form, in this case a 12 inch form, on a dot matrix printer. The printer is either an Espon LQ series or Okidata ML series; they both have drivers that support 12 inch forms. We have tested in Micrsoft Word and printer prints correctly on two pages, meaning the page is ejecting properly at end of first page.

My question is this. What is correct way to set the paper size? I have tried both below with inconsistent results. If anyone has a better, more reliable way, I would really appreciate it.

I have upgraded to FTDN - FWH 12.12; xHarbour 1.2.1 (Simplex) (Rev. 9656)
1. Before PRINT
nWid := ROUND( 8.5 * 254, 0) // 8.5 inches wide
nLen := ROUND( 12 * 254, 0) // 12 inches wide
PrnSetSize( nWid, nLen )
PRINT oPrinter FROM USER PRINT NAME "AWB" PREVIEW MODAL
.
.
ENDPRINT
nWid := ROUND( 8.5 * 254, 0)
nLen := ROUND( 11 * 254, 0)
PrnSetSize(nWid, nLen )

2. After PRINT

PRINT oPrinter FROM USER PRINT NAME "AWB" PREVIEW MODAL
if empty( oPrinter:hDC )
return nil
endif
nWid := ROUND( 8.5 * 254, 0)
nLen := ROUND( 12 * 254, 0)
oPrinter:SetSize( nWid, nLen )
.
.
ENDPAGE
nWid := ROUND( 8.5 * 254, 0)
nLen := ROUND( 11 * 254, 0)
oPrinter:SetSize( nWid, nLen )
ENDPRINT
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Dot Matrix Printing on non-standard form

Postby Randal » Wed Jan 30, 2013 11:36 am

Darrell:

We have a lot of users that use dot matrix printers and custom page sizes. We don't use the standard fwh print class or functions for these reports however, what we do is have the user define a custom page size in Windows and then set the printer to that page size. For example, under XP you would go to the Printers window select File|Server Properties, etc.

I know this is not the ultimate solution however, it may at least get the customer working consistently until you can find a more automated solution.

Regards,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Dot Matrix Printing on non-standard form

Postby cdmmaui » Wed Jan 30, 2013 12:22 pm

Dear Randal,

Thank you. We have tried that too, however we cannot make the AWB form the default form when printing. Any ideas?
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Dot Matrix Printing on non-standard form

Postby James Bott » Wed Jan 30, 2013 3:48 pm

Darrell,

Maybe this from my notes will help.

James
---------------------------

oPrinter:setSize( nWidth, nHeight )

Where nWidth and nHeight are in tenths of a millimeter.

25.4 millimeters per inch

So to set the size in inches:

oPrinter:setSize( 254 * nWidth, 254 * nHeight)

Where nWidth and nHeight are in inches.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 107 guests