By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,838 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,838 IT Pros & Developers. It's quick & easy.

Custom size paper problem

P: n/a
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

Feb 24 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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)

"Sukh" <su*********@gmail.com> schreef in bericht
news:11**********************@e56g2000cwe.googlegr oups.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

Feb 24 '06 #2

P: n/a
Thanks Peter but PrinterSettings.PaperSizes is ReadOnly Property.
:(

any other way :
Sukh

Feb 25 '06 #3

P: n/a
Hi, I know but it shows the papersizes supported buy the printer, so you can
check if your papersize is supported

Greetz Peter
"Sukh" <su*********@gmail.com> schreef in bericht
news:11*********************@t39g2000cwt.googlegro ups.com...
Thanks Peter but PrinterSettings.PaperSizes is ReadOnly Property.
:(

any other way :
Sukh

Feb 27 '06 #4

P: n/a
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

Feb 27 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.