Home All Groups Group Topic Archive Search About

Custom size paper problem

Author
24 Feb 2006 2:04 PM
Sukh
Hi,
I am tring to change the paper size from default to custom paper size.
In print preview its showing my custom size but when I print it print
on default paper size.
Can any one help me to figure out this?
I am using following code:
Dim customPaperSize As New PaperSize("11x9", 1100, 900)

pdMain.DefaultPageSettings.PaperSize = customPaperSize

'pdmain is  Friend WithEvents pdMain As
System.Drawing.Printing.PrintDocument

Thanks in advance
Sukh

Author
24 Feb 2006 3:52 PM
Peter Proost
Hi, the custom paper size has to be supported by the printer.  The
'PrinterSettings' provide a
'PaperSizes' property that contains all paper sizes supported by the
printer.

Hope this helps

Greetz Peter

--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)

Show quoteHide quote
"Sukh" <sukhsing***@gmail.com> schreef in bericht
news:1140789891.181750.238110@e56g2000cwe.googlegroups.com...
> Hi,
> I am tring to change the paper size from default to custom paper size.
> In print preview its showing my custom size but when I print it print
> on default paper size.
> Can any one help me to figure out this?
> I am using following code:
>  Dim customPaperSize As New PaperSize("11x9", 1100, 900)
>
> pdMain.DefaultPageSettings.PaperSize = customPaperSize
>
> 'pdmain is  Friend WithEvents pdMain As
> System.Drawing.Printing.PrintDocument
>
> Thanks in advance
> Sukh
>
Author
25 Feb 2006 2:19 AM
Sukh
Thanks Peter but PrinterSettings.PaperSizes is ReadOnly Property.
:(

any other way :
Sukh
Author
27 Feb 2006 2:51 PM
Peter
Hi, I know but it shows the papersizes supported buy the printer, so you can
check if your papersize is supported

Greetz Peter
Show quoteHide quote
"Sukh" <sukhsing***@gmail.com> schreef in bericht
news:1140833962.019939.20490@t39g2000cwt.googlegroups.com...
> Thanks Peter but PrinterSettings.PaperSizes is ReadOnly Property.
> :(
>
> any other way :
> Sukh
>
Author
27 Feb 2006 3:16 PM
Sukh
Hi Peter,
Thanks for your response. I fixed that issue using custom paper size
but now stuck with another problem
I am stuck with a problem Can anyone help me out from this...

I am printing a report on pre-printed continue paper using dot-matrix
printer using vb.net and paper size is my created custom page size

on first page Data is printing on all the correct locations. But
After printing first page it increase paper 3cm vertically/Height so on

second
page actual data goes down by 3 cm, So each time it increase 3 cm mean
on second page its 6cm and on 3rd page 9cm so on.... So After printing
the
first page on correct locations , data goes on different locations
which is complete mess.

please give any suggestion or any idea.

I am creating my own custom size page and setting the same for
printing.


Thanks
Sukh