I have a VB.NET program that needs to print envelopes, letterhead, and
regular (default) documents from a printers that may have three trays, or
may have only one tray and must prompt the user to load an envelope or
letterhead. (I know that each must be a separate Print Document).
I have code working now that allows me to select the printer that I need
however I don't now how to set anything else - such as landscape or
envelopes.
I want to use the Windows drivers rather than writing it myself (as I have
done before) so that new printers will act correctly.
There is documentation on setting the PaperSourceKind - or PaperKind however
I can't find any examples and this is quite confusing.
If anyone has a quick example of how to do this I would greatly appreciate
it!
Thanks VERY much,
Fred 4 2570
Fred,
I've never done paper tray selection but Landscape can be controlled by
implementing your own OnQueryPageSett ings handler and setting Landscape to
true on the PageSettings property of the QueryPageSettin gsEventArgs
argument. There is also a PaperSource setting for this which is probably
what you need to set.
Ron Allen
"Fred Nelson" <fr**@smartybir d.com> wrote in message
news:u9******** ******@TK2MSFTN GP12.phx.gbl... I have a VB.NET program that needs to print envelopes, letterhead, and regular (default) documents from a printers that may have three trays, or may have only one tray and must prompt the user to load an envelope or letterhead. (I know that each must be a separate Print Document).
I have code working now that allows me to select the printer that I need however I don't now how to set anything else - such as landscape or envelopes.
I want to use the Windows drivers rather than writing it myself (as I have done before) so that new printers will act correctly.
There is documentation on setting the PaperSourceKind - or PaperKind
however I can't find any examples and this is quite confusing.
If anyone has a quick example of how to do this I would greatly appreciate it!
Thanks VERY much,
Fred
Ron:
Thanks for your answer - can you give me an example of how to use the
PaperSource setting?
I've been searching MSDN and Google and can't find a single example and I
can't get it to work (I'm a relative newby)!
Thanks very much,
Fred
"Ron Allen" <rallen@_nospam _src-us.com> wrote in message
news:Oy******** ******@TK2MSFTN GP09.phx.gbl... Fred, I've never done paper tray selection but Landscape can be controlled
by implementing your own OnQueryPageSett ings handler and setting Landscape to true on the PageSettings property of the QueryPageSettin gsEventArgs argument. There is also a PaperSource setting for this which is probably what you need to set.
Ron Allen "Fred Nelson" <fr**@smartybir d.com> wrote in message news:u9******** ******@TK2MSFTN GP12.phx.gbl... I have a VB.NET program that needs to print envelopes, letterhead, and regular (default) documents from a printers that may have three trays,
or may have only one tray and must prompt the user to load an envelope or letterhead. (I know that each must be a separate Print Document).
I have code working now that allows me to select the printer that I need however I don't now how to set anything else - such as landscape or envelopes.
I want to use the Windows drivers rather than writing it myself (as I
have done before) so that new printers will act correctly.
There is documentation on setting the PaperSourceKind - or PaperKind however I can't find any examples and this is quite confusing.
If anyone has a quick example of how to do this I would greatly
appreciate it!
Thanks VERY much,
Fred
Fred,
Did you see my other response with a sample?
-CJ
"Fred Nelson" <fr**@smartybir d.com> wrote in message
news:OZ******** ******@tk2msftn gp13.phx.gbl... Ron:
Thanks for your answer - can you give me an example of how to use the PaperSource setting?
I've been searching MSDN and Google and can't find a single example and I can't get it to work (I'm a relative newby)!
Thanks very much,
Fred
"Ron Allen" <rallen@_nospam _src-us.com> wrote in message news:Oy******** ******@TK2MSFTN GP09.phx.gbl... Fred, I've never done paper tray selection but Landscape can be controlled by implementing your own OnQueryPageSett ings handler and setting Landscape
to true on the PageSettings property of the QueryPageSettin gsEventArgs argument. There is also a PaperSource setting for this which is
probably what you need to set.
Ron Allen "Fred Nelson" <fr**@smartybir d.com> wrote in message news:u9******** ******@TK2MSFTN GP12.phx.gbl... I have a VB.NET program that needs to print envelopes, letterhead, and regular (default) documents from a printers that may have three trays, or may have only one tray and must prompt the user to load an envelope or letterhead. (I know that each must be a separate Print Document).
I have code working now that allows me to select the printer that I
need however I don't now how to set anything else - such as landscape or envelopes.
I want to use the Windows drivers rather than writing it myself (as I have done before) so that new printers will act correctly.
There is documentation on setting the PaperSourceKind - or PaperKind
however I can't find any examples and this is quite confusing.
If anyone has a quick example of how to do this I would greatly appreciate it!
Thanks VERY much,
Fred
CJ:
Yes - I did see your other reply and I'm working on it now
Thanks again for your help!
Fred
"CJ Taylor" <no****@blowgoa ts.com> wrote in message
news:10******** *****@corp.supe rnews.com... Fred,
Did you see my other response with a sample?
-CJ "Fred Nelson" <fr**@smartybir d.com> wrote in message news:OZ******** ******@tk2msftn gp13.phx.gbl... Ron:
Thanks for your answer - can you give me an example of how to use the PaperSource setting?
I've been searching MSDN and Google and can't find a single example and
I can't get it to work (I'm a relative newby)!
Thanks very much,
Fred
"Ron Allen" <rallen@_nospam _src-us.com> wrote in message news:Oy******** ******@TK2MSFTN GP09.phx.gbl... Fred, I've never done paper tray selection but Landscape can be
controlled by implementing your own OnQueryPageSett ings handler and setting
Landscape to true on the PageSettings property of the QueryPageSettin gsEventArgs argument. There is also a PaperSource setting for this which is probably what you need to set.
Ron Allen "Fred Nelson" <fr**@smartybir d.com> wrote in message news:u9******** ******@TK2MSFTN GP12.phx.gbl... > I have a VB.NET program that needs to print envelopes, letterhead,
and > regular (default) documents from a printers that may have three
trays, or > may have only one tray and must prompt the user to load an envelope
or > letterhead. (I know that each must be a separate Print Document). > > I have code working now that allows me to select the printer that I
need > however I don't now how to set anything else - such as landscape or > envelopes. > > I want to use the Windows drivers rather than writing it myself (as
I have > done before) so that new printers will act correctly. > > There is documentation on setting the PaperSourceKind - or PaperKind however > I can't find any examples and this is quite confusing. > > If anyone has a quick example of how to do this I would greatly appreciate > it! > > Thanks VERY much, > > Fred > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andy Newland |
last post by:
Hi Guys,
I would like to print out a word document using a VB .NET
component. I have got VBA and VB.Net talking to each other
and can pass word objects between COM and .NET.
My reason for doing this is to enable myself to be able to
use the PrintSettings class and all of its advanced
features - Duplex on/off, Color on/off etc.
|
by: Palli Olafs |
last post by:
Hi
Is it possible to save the PrintDocument as file without using a printer?
|
by: Frank Rizzo |
last post by:
Hello,
I have an OCX control on my WinForm (don't ask, i have to use it) and it
generally works well. One of the methods of the OCX prints to an hDC
(device context handle for history buffs). Seeing how everything in
..NET prints to a PrintDocument object, I was wondering how I can
retrieve the hDC of the PrintDocument? Or am I looking in the wrong place?
|
by: Augusto Ruiz García |
last post by:
Hello all,
Is there any way of finding out the number of pages a PrintDocument has
using current Printer settings? If so, how can it be done?
TIA.
|
by: active |
last post by:
Dim mPD As PrintDocument
Dim mPrinternameSaved As PrintDocument
Public WriteOnly Property PrintDocument() As PrintDocument
Set(ByVal value As PrintDocument)
mPD = value
mPrinternameSaved = mPD
I wanted to do something like the above except that I wanted
mPrinternameSaved to be an additional set of data identical to that stored
| |
by: Mika M |
last post by:
Hi all!
I have made an application for printing simple barcode labels using
PrintDocument object, and it's working fine.
Barcode printer that I use is attached to the computer, and this
computer has drivers installed for this printer, and this printer is
shared for the network.
Question 1:
|
by: Steve |
last post by:
I'm trying real hard to set the printer resolution for a PrintDocument. It
appears that the printer is already set to 300 x 300 dpi, which is JUST what
I want.
But the Margins and PrintableArea properties of the PageSettings in the
Print handler are reporting values that indicate 100 dpi, for example it
reports PaperSize as 850, 1100 (8.5" x 11")
I'm passing these Rectangle properties into a method that is drawing
thinking it's working...
|
by: bp |
last post by:
Hi,
I try to use my own PreviewDialog with a PrinPreviewControl, to preview a
document of type MyPrintDocument, and I want to implement the PrintRange
functionnality (print some pages between 2 values).
I noticed that we can specified the PrintRange, FromPage and ToPage
properties of the PrintDocument.PrintSettings object, but, as said in MSDN :
"The FromPage, ToPage and PrintRange can also be set programmatically,
|
by: kig25 |
last post by:
Hello,
When using the VB.NET PrintDocument class, I seem to be encountering an
issue where the sub pd_PrintPage handles PrintDocument.PrintPage (upon
continuing if HasMorePages = true) will paint the next page on top of
the original page. In a sample data case where the source is long
enough to fill three pages, I end up with four calls to pd_PrintPage
which render onto two printed sheets. Historical posts in this forum
from 2003 and...
|
by: tchien69 |
last post by:
I'm developing a Visual Basic.Net 2005 Windows Service Application that needs to print using the PrintDocument Class to a Remote Printer and also to a File. Since it's an unattended Windows Service program, there can be no UI which voids the solution I've seen elsewhere of setting the PrintToFile Property in PrintDocument.PrintSettings or in PrintDialog which isn't used in my app all.
I've tried to set the PrintSettings.PrinterName to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |