473,695 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing a File..

VJ
I am able to print to File, which I am doing fine in our Program now. I want
to be able to take this file and Print to a printer.

Vijay
Jan 12 '06 #1
6 2212
Vijay,

Do you have a library that will do it already, or do you have to "draw"
the contents to the printer yourself? If the answer is the latter, then you
should check out the PrintDocument class in the System.Drawing. Printing
namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
I am able to print to File, which I am doing fine in our Program now. I
want to be able to take this file and Print to a printer.

Vijay

Jan 12 '06 #2
VJ
I have printed to the File. The file physically exists in a Windows Folder.
I want to be able to open and print this file from my program

Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:ON******** ******@TK2MSFTN GP14.phx.gbl...
Vijay,

Do you have a library that will do it already, or do you have to "draw"
the contents to the printer yourself? If the answer is the latter, then
you should check out the PrintDocument class in the
System.Drawing. Printing namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
I am able to print to File, which I am doing fine in our Program now. I
want to be able to take this file and Print to a printer.

Vijay


Jan 12 '06 #3
VJ,

Is the file a custom format, or is it handled by another application?
If so, what kind of file, and what application is it?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uy******** ******@tk2msftn gp13.phx.gbl...
I have printed to the File. The file physically exists in a Windows Folder.
I want to be able to open and print this file from my program

Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:ON******** ******@TK2MSFTN GP14.phx.gbl...
Vijay,

Do you have a library that will do it already, or do you have to
"draw" the contents to the printer yourself? If the answer is the
latter, then you should check out the PrintDocument class in the
System.Drawing. Printing namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
I am able to print to File, which I am doing fine in our Program now. I
want to be able to take this file and Print to a printer.

Vijay



Jan 12 '06 #4
VJ
Nicholas,

Its a Jpeg file, with one ore more pages. It is generatred by our porgram,
using classes in System.Drawing. Printing namespace.

Vijay
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:O2******** *****@TK2MSFTNG P12.phx.gbl...
VJ,

Is the file a custom format, or is it handled by another application?
If so, what kind of file, and what application is it?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uy******** ******@tk2msftn gp13.phx.gbl...
I have printed to the File. The file physically exists in a Windows
Folder. I want to be able to open and print this file from my program

Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:ON******** ******@TK2MSFTN GP14.phx.gbl...
Vijay,

Do you have a library that will do it already, or do you have to
"draw" the contents to the printer yourself? If the answer is the
latter, then you should check out the PrintDocument class in the
System.Drawing. Printing namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
I am able to print to File, which I am doing fine in our Program now. I
want to be able to take this file and Print to a printer.

Vijay



Jan 12 '06 #5
Vijay,

If you are doing that, you can use the PrintDocument class. When the
Print event is called, your handler should load the JPG and then call the
DrawImage method on the Graphics instance passed to your event handler.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uc******** *****@TK2MSFTNG P15.phx.gbl...
Nicholas,

Its a Jpeg file, with one ore more pages. It is generatred by our porgram,
using classes in System.Drawing. Printing namespace.

Vijay
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:O2******** *****@TK2MSFTNG P12.phx.gbl...
VJ,

Is the file a custom format, or is it handled by another application?
If so, what kind of file, and what application is it?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uy******** ******@tk2msftn gp13.phx.gbl...
I have printed to the File. The file physically exists in a Windows
Folder. I want to be able to open and print this file from my program

Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:ON******** ******@TK2MSFTN GP14.phx.gbl...
Vijay,

Do you have a library that will do it already, or do you have to
"draw" the contents to the printer yourself? If the answer is the
latter, then you should check out the PrintDocument class in the
System.Drawing. Printing namespace.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
>I am able to print to File, which I am doing fine in our Program now. I
>want to be able to take this file and Print to a printer.
>
> Vijay
>



Jan 12 '06 #6
VJ
Ok I have tried that.. Let me be more specific in my problem...

My Print, Print To File, Preview all work fine with Regular printers. .I am
having trouble printing to a mini printer Zebra RW420. When I use my print
as described earlier, or as you have suggested it prints Junk characters. It
works, if I do a print to file and go to that file and open it in Paint
program, Microsoft Image Editing software or any Windows program, I try to
print, the file prints properly. When I do the same thing as a Print
command, it fails. I have spoken to the Zebra tech support and they are
clueless.. they are like .NET what?.. so I was trying to see if I can
replicate like a shell print command that I can execute on the file. Anyway
I can do it.. or I should be able to prove that there this is a printer
setting problem

Thanks
Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:ei******** ******@TK2MSFTN GP15.phx.gbl...
Vijay,

If you are doing that, you can use the PrintDocument class. When the
Print event is called, your handler should load the JPG and then call the
DrawImage method on the Graphics instance passed to your event handler.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uc******** *****@TK2MSFTNG P15.phx.gbl...
Nicholas,

Its a Jpeg file, with one ore more pages. It is generatred by our
porgram, using classes in System.Drawing. Printing namespace.

Vijay
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:O2******** *****@TK2MSFTNG P12.phx.gbl...
VJ,

Is the file a custom format, or is it handled by another application?
If so, what kind of file, and what application is it?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"VJ" <vi********@yah oo.com> wrote in message
news:uy******** ******@tk2msftn gp13.phx.gbl...
I have printed to the File. The file physically exists in a Windows
Folder. I want to be able to open and print this file from my program

Vijay

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om>
wrote in message news:ON******** ******@TK2MSFTN GP14.phx.gbl...
> Vijay,
>
> Do you have a library that will do it already, or do you have to
> "draw" the contents to the printer yourself? If the answer is the
> latter, then you should check out the PrintDocument class in the
> System.Drawing. Printing namespace.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mv*@spam.guard. caspershouse.co m
>
> "VJ" <vi********@yah oo.com> wrote in message
> news:u%******** *******@TK2MSFT NGP15.phx.gbl.. .
>>I am able to print to File, which I am doing fine in our Program now.
>>I want to be able to take this file and Print to a printer.
>>
>> Vijay
>>
>
>



Jan 12 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4853
by: Jody Gelowitz | last post by:
I am having a problem with printing selected pages. Actually, the problem isn't with printing selected pages as it is more to do with having blank pages print for those pages that have not been selected. For example, if I were to have 5 pages with every second page printing, I would get the following results: Page 1 = Print OK Page 2 = Blank Page 3 = Print OK Page 4 = Blank
9
4106
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the PrintDialog control under a security setting with only SafePrinting allowed. I have attached a sample project that I am using to try to accomplish this. The print dialog appears, but when I press the Print button, I get an exception (at the end...
0
1644
by: DotNetDummy | last post by:
Hi all, I am trying to set the printing setting e.g duplex mode etc. on a default printer when I.E object started printing a particular html doc. Here's the partial code, any help would be appreciated. I have been using system.drawing.printing method but not much help since drawing.printing required printDocument() object which specially
5
10135
by: Patrick De Ridder | last post by:
How can I turn what I want to print 90 degrees using the logic below? Please tell me the code with which to make the modification. Many thanks, Patrick. using System.ComponentModel; using System.Drawing; using System.Drawing.Printing; using System.IO;
6
1901
by: Bruno Hardmeier | last post by:
Hi How can I redirect a print job to a file? There is a checkbox in the print dialog, but I would like to do it in code indicating a filename. Thanks Bruno Hardmeier
4
3163
by: Rob T | last post by:
I have a small VB program that has a printing module...very simple....and works great. However, If I try to print to a generic printer, I get the following error: "The data area passed to a system call is too small". I found the following article, that I assume is similar to my problem, which is of little help: http://support.microsoft.com/default.aspx?scid=kb;en-us;822779 Any suggestions?
1
5709
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out of a Microsoft book, "Visual Basic,Net Step by Step" in Chapter 18. All but the bottom two subroutines will open a text file, and then allow me to use the above controls, example 1. The bottom two subroutines will print a graphic file, example...
8
5891
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic do deliver one <objecttag
2
1436
by: coldblood22 | last post by:
Well in my Application i am using the java Printable interface to print the GUI. The printing is done fine but once done with the printing my program breaks off with the database file without. Well i haven't made any calls to close the database after printing. But after printing, none of the modules recognize the database file. I manually tried to close and open the database after printing but still it is not able to access the tables. I am...
18
11295
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing classes, for each of the checked rows in the GridView. This works fine in the Visual Studio 2005 development environment on localhost. But, when I move the page to the web server, I get the error "Settings to access printer...
0
8650
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9140
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
8864
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
8838
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
7685
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 projectplanning, coding, testing, and deploymentwithout 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...
1
6510
isladogs
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...
0
5843
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
4597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1987
bsmnconsultancy
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...

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.