Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fputc Page Break

Status
Not open for further replies.

tcwillis

Programmer
Sep 29, 2004
3
US
Hello,

I am capturing data and writing it to a .txt file. I am attempting to then add a page break after each data capture. For some reason, my ascii 12 character is not giving me a page break. I have attached the associated code. Any suggestions would be appreciated.

T. Willis


string sFileName = "Metering Data.txt"

capture on
.
.
.
capture off

fopen 0 sFileName APPEND
fputc 0 12 ;page break
fclose 0
 
I think the problem here is the application that you are opening the text file with not recognizing the ^L. I tried doing something similar in the past and even though the page break character was there, the application (Notepad I think) didn't acknowledge it. What I ended up having to do was determine how many lines were on the printed page, then read and rewrite the capture file with the proper number of blank lines on each page.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top