469,623 Members | 1,505 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

PrintDocument and Custom PaperSize

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
0 1672

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by PMGuy | last post: by
reply views Thread by Jacek | last post: by
reply views Thread by Dino Buljubasic | last post: by
2 posts views Thread by Steve | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.