473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Printing files

vninja
40
Hey There,

I'm learning C++ two different ways (in a class and through a book). right now i'm stuck (getting ahead) and i'm looking how to print a simple text file. problem being that on my computer i do not have a printer (as i'm making a program for a friend) and need to print a file which is the only thing i'm not too sure about doing. its a simple command prompt window so i don't need to creat any forms (yet). any help would be greatly appreciated.

so far i got this but not too sure if it will send to the printer

system("print txtfile.txt");

would that line print the file?
if not what line(s) would?

thx\
V
Oct 12 '06 #1
4 3549
Banfa
9,065 Expert Mod 8TB
system("print txtfile.txt");

would that line print the file?
Possibly/probably. unfortunately printing just isn't simple.

You could also try

Expand|Select|Wrap|Line Numbers
  1. ShellExecute(NULL, "print", "txtfile.txt", NULL, NULL, 0);
  2.  
Oct 12 '06 #2
vninja
40
Thx man, is there a library/class with the ShellExecute function?
Oct 12 '06 #3
Banfa
9,065 Expert Mod 8TB
It's part of the Windows API, not sure where it exists in all that .NET garbage
Oct 12 '06 #4
vninja
40
cool. unfortuneatly i'm learning with the .NET garbage. Thx for the help
Oct 14 '06 #5

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

Similar topics

10
by: db | last post by:
Hi group I have noticed that the printing framework in java supports a great deal of files, but not MS/Word .doc files. So if I want to print doc files what should I do? Get a lib that supports...
7
by: Kamilche | last post by:
I'm pretty desperate to get color syntax printing. I just tried out the evaluation version of 'Komodo', which several people in here suggested, and its print features are terrible. The text is...
11
by: cybertof | last post by:
Hello, Is there a way to easily print a .pdf file to the printer ? (without an external component) Thanks.
4
by: Arif | last post by:
I C# code prints very slow as compared to a third party barcode printing software. That software prints approximately 10 labels in 2 seconds while my C# code prints 10 labels in 5 to 6 seconds. And...
1
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...
0
by: ryanf | last post by:
Hello, I need some help with printing pdf files through php. I have a script that will create many pdf files but I want them printed. I found this program to print pdf from the command line from...
0
by: Hank | last post by:
We have been printing pdf files through Adobe, from Access for several years. Adobe version 5.0 is currently installed. Recently we have received PDF files that were created under the Adobe 7.0...
3
by: crashonyou | last post by:
hello again..i've been searching for quite some time now already looking for a solution to printing word documents with python..same thing for internet explorer..i was experimenting around with some...
8
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...
1
by: crashonyou | last post by:
hello..would just like to ask a little help here regarding printing pdf files..i am currently making an automated system for printing files and i have encountered an interesting problem..i already...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.