I am having a problem setting the paper size for a 12" document for a dot matrix printer using the following code. The first page prints fine but it does not feed properly to the next form. I have tried PrnSetSize(nWid, nLen ) as well with no luck.
nWid := ROUND( 8.5 * 254, 0)
nLen := ROUND( 12 * 254, 0)
PRINT oPrinter FROM USER NAME "Air WayBill: "
if empty( oPrinter:hDC )
return nil
endif
oPrinter:SetSize( nWid, nLen )
.
.
.
// Done...
nWid := ROUND( 8.5 * 254, 0)
nLen := ROUND( 11 * 254, 0)
oPrinter:SetSize( nWid, nLen )
ENDPRINT
Setting paper size
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Darell,
It may be that the printer driver doesn't support the paper size you are trying to use. See the old message below. I don't know if there is a solution if the driver doesn't support it.
Regards,
James
It may be that the printer driver doesn't support the paper size you are trying to use. See the old message below. I don't know if there is a solution if the driver doesn't support it.
Regards,
James
"Richard Huang" <richard@easysend.com.tw> ha scritto nel messaggio
news:3a19d333@servidor3a.dimasoft.es...
> Hi FiveWin users:
>
> I want to End-users input any papers length and width.Cause them have many report forms.How to convert to correct position?
>
> Richard Huang
> richard@easysend.com.tw
> richard@fivetech.net
> http://taiwan.fivetech.net
> ICQ:70552246
From: Marco Turco <info@mmdata.net>
Subject: Re: How to setup paper length and width?
Date: Wednesday, November 22, 2000 11:06 AM
Try this ...
function UserFormat()
oPrn:=PrintBegin("",.f.,.T.)
oPrn:SetPortrait()
aa:=oPrn:GetPhysize()
old1:=round(aa[1],0) && actual value
old2:=round(aa[2],0) && actual value
x1:=old1
x2:=old2
DimUtente() && request the new format
oPrn:SetSize(x1*10,x2*10) && setting the new format
aa:=oPrn:GetPhysize() && verify that the driver support it
new1:=round(aa[1],0)
new2:=round(aa[2],0)
if new1<>x1 .or. new2<>x2 && if not supported retrive the old value
errore(10,10,183)
oPrn:SetSize(old1*10,old2*10)
endif
oPrn:End()
FUNCTION DimUtente()
DEFINE DIALOG oDlg1 FONT oGenFont RESOURCE "DIALOG_303"
REDEFINE GET x1 ID 101 of oDlg1 picture "@k 999" && enter 210 for A4
REDEFINE GET x2 ID 102 of oDlg1 picture "@k 999" && enter 297 for A4
REDEFINE BUTTON ID 105 OF oDlg1 ;
ACTION (oDlg1:End())
REDEFINE BUTTON ID 106 OF oDlg1 ;
ACTION oDlg1:End()
ACTIVATE DIALOG oDlg1 centered
Hi
Thanks for your reply.But How do I convert to paper size to
oPrn:SetSize()?How do I print position form(Ex.1234567890)?Could you please give me sample file how to make it?Thank you.
Best Regards
Richard Huang
richard@easysend.com.tw
richard@fivetech.net
http://taiwan.fivetech.net
ICQ:70552246
----- Original Message -----
From: "MMDATA INFORMATICA" <INFO@MMDATA.NET>
To: <richard@easysend.com.tw>
Sent: Wednesday, November 22, 2000 2:16 AM
Subject: Re: How to setup paper length and width?
> I use oPrn:SetSize, so I can support all format,
> after setting I use oPrn:GetPhysize (it return the actual paper size) to
> verify that the printer driver
> supports the new format.
> RGDS
> MMDATA INFORMATICA
> Marco Turco
> www.mmdata.net
> info@mmdata.net
>
> "Richard Huang" <richard@easysend.com.tw> ha scritto nel messaggio
> news:<3a19d333@servidor3a.dimasoft.es>...
> > Hi FiveWin users:
> > I want to End-users input any papers length and width. Cause them have many report forms.How to convert to correct position?
> >
> > Richard Huang
> > richard@easysend.com.tw
> > richard@fivetech.net
> > http://taiwan.fivetech.net
> > ICQ:70552246