Solved

Printing (LETTER Size) in vb.net

Posted on 2004-10-19
3
1,186 Views
Last Modified: 2008-01-09
I have a very picky laser printer (minolta 2300dl) that i need to always print letter size to in order to avoid customer interaction.  My current vb.net app appears to be printing a "custom" papersize by default, which my laser printer translates to "legal govt" and then asks for user interaction.  How do i set the .defaultpagesettings.papersize.kind to paperkind.letter permenantly?  everything i've tried doesn't seem to work.  i even tried   .defaultpagesettings.papersize = new papersize("myletter",850,1100) but the laser printer errors out saying illegal size ...

any ideas?

Thanks,
Nick
0
Comment
Question by:NickUA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12352320
0
 
LVL 1

Author Comment

by:NickUA
ID: 12353166
that doesn't help at all, i found that article on google as well.  1) i'm using all WinXP, i don't care if it works in nt/2000, this is a closed environment program.. that is a bug and workaround for NT/2000.  2) that code is in C#, not VB.Net (i could translate it but don't need to).  3) i don't want to do a custom size, i want to do the size "Letter" surely somewhere there is an article or someone has run into this problem somewhere.

Thanks,
Nick
0
 
LVL 9

Accepted Solution

by:
Lacutah earned 500 total points
ID: 12364865
Use the paper sizes provided by the printer itself to set the paper size to Letter.

For example, in the sub New() of the Print Document class you've created, add the following code:
dim ps as Printing.PaperSize
for each ps in PrintDocument.PrinterSettings.PaperSizes
   'See if it's the letter size...
   if ps.PaperName.ToLower.IndexOf("letter") >= 0 then
       'Found letter size!  Store it to a class-wide variable
        m_PS = ps
        exit for
   end if
next

In the PrintDocument Class QueryPageSettings Event:
e.PageSettings.PaperSize = m_PS
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question