Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   printing a txt file issue (http://www.programmingforums.org/showthread.php?t=13409)

badbasser98 Jun 22nd, 2007 10:49 AM

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:D

Win XP pro
Dev-C++ 4.9.9.2

Thanks,
-BB98

DaWei Jun 22nd, 2007 11:56 AM

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.

badbasser98 Jun 22nd, 2007 12:31 PM

hmm... didn't think of that, I'll give it a shot. Thanks DaWei


All times are GMT -5. The time now is 2:38 AM.

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