469,612 Members | 2,169 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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
computer.
'Code used to get the type of paper

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

Encontrado = True
Exit For
End If
Next

'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 3 '06 #1
0 1296

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Pedro Feio | last post: by
reply views Thread by Raul | last post: by
4 posts views Thread by ░╦┤ˇ╔Ż╚╦ | last post: by
1 post views Thread by JuanCarlos Gomez | last post: by
1 post views Thread by bafidi | last post: by
reply views Thread by Madern | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.