Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 22nd, 2007, 10:49 AM   #1
badbasser98
Hobbyist Programmer
 
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4 badbasser98 is on a distinguished road
printing a txt file issue

Its been a long time since i have been able to mess around with some of my programs again. I am putting the finishing touches on an alpha version of an electronic help desk app. I am looking to be able to print each help ticket out. Right now the only method I have been able to come up with is to send the edit fields to a TXT file and print that file. It works great except that the description field runs off the page. Is there any way to programmaticly print that file with word wrap enabled? I have opened the TXT file in Windows and turned on word wrap, but that makes no difference. I am using this command to print:
 
system("print /d:\\\\ServerName\\PrinterName c:\\FileName.txt");

The reason I am coping the edit fields to a TXT file is that all the entries are contained in a single DAT file and I have no clue how to extract just one entry to print. If there is a better way to do this I am all ears

Win XP pro
Dev-C++ 4.9.9.2

Thanks,
-BB98
__________________
Learning to use C++ and loving every minute of it.
badbasser98 is offline   Reply With Quote
Old Jun 22nd, 2007, 11:56 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
You could process the .txt file, before printing, to limit line lengths. Probably you could limit the line lengths when you're generating it, but we'd have to guess at your code to comment on that.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 22nd, 2007, 12:31 PM   #3
badbasser98
Hobbyist Programmer
 
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4 badbasser98 is on a distinguished road
hmm... didn't think of that, I'll give it a shot. Thanks DaWei
__________________
Learning to use C++ and loving every minute of it.
badbasser98 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem processing file into a char array csrocker101 C++ 1 May 9th, 2007 12:50 AM
converting string to float beginnerCCC C 22 Oct 3rd, 2006 12:59 AM
OnlineTextEditor.Com! Sane Show Off Your Open Source Projects 43 Jun 16th, 2006 9:55 AM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 10:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 5:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:51 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC