0

i want to create a text report and i have use this coding:-

<?php
$f=fopen("c:\amit.txt", "wb");

// adding header
$text="\n Your text to write \n ".date('d')."-".date('m')."-".date('Y')."\n\n";
fputs($f, $text);
fclose($f);
?>

which results me some thing like when i open it in windows [i.e my computer->c drive->mit.txt] :-

[]Your text to write[]09-09-2012[][]

but i want it like this

Your text to write
09-09-2012

and in fanfold paper size 14" * 12"
as i have a huge data to create a report for ex payslip of all employee in my company

plz help me

3
Contributors
7
Replies
8
Views
4 Years
Discussion Span
Last Post by amit.chaudhari.71
0

Not sure about that, but you can set dimensions in a Print CSS file. You can set page breaks etc, but I'm not sure that it can be set dynamically, unless you use js.

Edited by diafol

0

sir very very thanks for replying me but as i am a very fresher in this feild plz give me some sampal js and print ccs coding for line break / set page breaks etc so that i can get my output file [amit.txt] like

Your text to write
09-09-2012

instant of

[]Your text to write[]09-09-2012[][]

when i open it in windows [i.e my computer->c drive->amit.txt]

kind att. plz
currently i am using visual basic 6.0 and i use char(12) function for line break and char(13) function for page break
and
i want to switch this program vb 6.0 to php

i think i have made myself clear to u.

plz help me to come out of it

plz....................

0

I am not sure how you can add page break in plain text file. I think its dependent on software you use to open file like notepad/wordpad/word etc.

0

dear friends , i got my solutions by using \r\n for line break and \n\f for paze break
but remimber that report should contains 60 to 75 nos of line per page depending on font/fonte size u use

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.