I am trying to write a file and I have to go to a new page when I write certain of records. Please help me and let me know how to add a page break when create file by writing records into the file. Thanks a lot!
Will
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AnttiPosted Feb 16, 2006, 7:06 AM
Mohammed SajidPosted Feb 16, 2006, 5:31 AM
AnttiPosted Feb 16, 2006, 4:57 AM
And if I did understand your problem correctly, you need to add page break information into your text file? In that case you have to add some special character sequence, that indicates a page break. For example "\p" or "" or maby a '0xC'-character, which seems to be a "NP form feed, new page" character in ASCII table. Or one more elegant solution would be that you save your information in XML format, where it is easy to find each record.
And the program that converts your txt to pdf, is it your own makings, or...? If it is, you simply look for your page break character sequence, and add a page break into the pdf. If it is not your own program, you should at least try for '0xC' character, and if it's not working, ask for converter manufacturer if there is a way to force a page break.
In the case you are making that txt to pdf converter, you should check the PDF reference for details how to add a page break.
will hePosted Feb 15, 2006, 9:46 AM
All what I try to do is When I convert the my txt file which is created by program into PDF file, I can force the one record be one page in PDF. Thanks.
AnttiPosted Feb 15, 2006, 2:52 AM