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

PrintDocument and Custom PaperSize

P: n/a
Good Morning,
I'm developing a code that needs to deal with
different printer user formats which have to be
created on a network driver printer (OKI 321).

The big issue I am finding is that the printer doesn't
allow me to handle with more than 1 defined format at
the same time. We could say it allows me to define
just ONE format at a time (and it is going to work
with the last format I set), even though the settings
are being defined either manually -at the printer
server- or with the given code seen below.

In addition, when I use that code, it will not work
when the printer is not physically connected to the
'Code used to get the type of paper

For Each PaperSize In
PaperSize.PaperName.IndexOf(oDSInfo.Tables(0).Rows (0)("NombrePapel"))
= 0 Then

Encontrado = True
Exit For
End If

'If PaperSize was not found, I call this function
'which creates the adequate paper size at the printer
MJMCustomPrintForm.MJMCustomPrintForm.AddCustomPap erSize(PrinterName,
"_jf" & oDSInfo.Tables(0).Rows(0)("PaperName") &
vbNullString, rPagina.Width, rPagina.Height)

PrintDoc.DefaultPageSettings.PaperSize = PaperSize

PrintDoc.PrinterSettings.DefaultPageSettings.Paper Size
= PaperSize

However, even though I set the correct Papersize if
there is more than one personalized format set, it
only will take the last format defined.

Can anybody help me, please?

Thank you very much in advance ...!

Apr 4 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.