473,748 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print a Envelope using VB.net

1 New Member
We are using an application to print a letter and its envelope to the printer. The application was performing properly till we upgraded our printers to Canon 3225/1555. The envelopes gets processed from the regular tray instead of the feeder tray.

this how we set the envelop

Code in PrintEnvelope_B eginPrint event
Expand|Select|Wrap|Line Numbers
  1.  With PrintEnvelope.DefaultPageSettings
  2.             .PaperSize = New Printing.PaperSize(Printing.PaperKind.Number10Envelope, 412, 910)
  3.             .Landscape = True
  4.             .Margins.Left = 10
  5.             .Margins.Right = 10
  6.             .Margins.Top = 25
  7.             .Margins.Bottom = 25
  8.         End With
Code in the CmdButton before the .print is called


Expand|Select|Wrap|Line Numbers
  1.  Dim papSource As System.Drawing.Printing.PaperSource
  2.                 For Each papSource In PrintEnvelope.PrinterSettings.PaperSources
  3.                     If papSource.Kind = PaperSourceKind.Envelope Then
  4.                         PrintEnvelope.DefaultPageSettings.PaperSource = papSource
  5.                         Exit For
  6.                     End If
  7.                 Next
I am not able to understand what has changed that the printer does not recognise the difference in papersize and source.

Thank you
Anu
Sep 1 '09 #1
0 2086

Sign in to post your reply or Sign up for a free account.

Similar topics

0
6903
by: Stephen Chell | last post by:
I'm using SAAJ 1.2 (from jwsdp-1.3) and JDK 1.4.2_03. I've written a client application that uses the SAAJ api to send a SOAP message to a servlet. The servlet successfully receives the message and returns a SOAP response containing a single element in the SOAP body. The client receives the response and writes its content to standard out via the SOAPMessage.writeTo() method. The response received looks correct: <SOAP-ENV:Envelope...
10
2869
by: David C | last post by:
We have a classic ASP intranet web site that has been around for a while. Our customer wants to be able to print an envelope from the contact name and address table. We have other reports that we display and print from the HTML generated by our ASP code, but have not been able to find any way to format a page and print to an envelope. Can anyone help? Thanks. David
0
1151
by: Markus Stehle | last post by:
Hi all! I need to create an soap envelope that will be sent to an external service using HTTP POST. I created the required classes which are serialized using XmlSerializer. The envelope should look like this: <Envelope xmlns="http://www.w3.org/2001/12/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2001/12/soap-envelope soap-envelope.xsd">
5
14455
by: Fred Nelson | last post by:
Hi: I'm trying to write a program that will print envelopes using a HP Laserjet 4 that has three trays. In the future this program will work with other printers so I don't want to "hard code" (or send raw output) to accomplish this. I'm trying to figure out how to set the PaperSource property and haven't had any luck! I've searched MSDN and Google and can't find a single example.
4
2832
by: dgk | last post by:
Anybody have any code for selecting an appropriate printer and printing an envelope? Greatly appreciated.
1
4788
by: pmasclark | last post by:
Hello, I created a web site, site A, that redirects to another web site, site B, where a simple web service is hosted. The code to call the web service is simple. oWS.AllowAutoRedirect = True oWS.Credentials = New System.Net.NetworkCredential("user","pass") str = oWS.HelloWorld("World")
0
3601
by: Patrick Brunmayr | last post by:
Hello I have a big Problem with validating a Soap Envelope. I have downloaded the xsd for a soap envelope from http://schemas.xmlsoap.org/soap/envelope/ The validation succeeds as lonng as i don't use elements in body with a xsi:type attribute! The Problem is that foo:person is an abstract type and foo:driver is dervived from it. So using a foo:person is not allowed until specifing
0
3061
by: broersen | last post by:
Hello, Does someone know how to create manually the header for an SOAP message, without having an WSDL? I also use an X509 certificate for connecting to the webservice. Can anyone help me to get on the right road. I have to talk to an old Java webservice, so that's why I don't have an WSDL. I'm sending it with HTTPWebRequest or HTTPSWebRequest with VB but I needed a header like this: Request:
2
2362
by: monsalvo | last post by:
What's so wrong with my code? This line is part of a VBScript soap client part of a DTS wich is functional in a 90 percent. strText = .responseXML.selectSingleNode("//" login "loginReturn") Produces the following error Char: 46 Error: Expeted )
0
8991
marktang
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...
0
9552
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9326
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
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...
0
8245
agi2029
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...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
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...
0
4877
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.