![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
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. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
hmm... didn't think of that, I'll give it a shot. Thanks DaWei
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |