Solved

Insert a FormFeed in a page

Posted on 2000-03-27
6
163 Views
Last Modified: 2008-03-06
Hello,
I want to Print a Document(HTML) with a determinate number of lines (per page), and with some pages,
How can I break the impresion of the page, and continue the impresion in other page?

Thanks.Manolo
0
Comment
Question by:ManoloMA
6 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 2660428
You have to do this server side. So, if you have a textfile. You open the textfile on the server. read a certain number of lines, and print them on the HTML page. Make a link, to go back and forth. Pass the linenumber you have to continue from to the server again. And let your page read the file again FROm that specified line.

It shouldn't be too hard

like:


  var fso, f, r, count;
  count = 0
  fso = new ActiveXObject("Scripting.FileSystemObject");
  f = fso.OpenTextFile("c:\\yourfile.txt", ForReading);
  do while (!r.eof && count!=20)
  {
      r = r + f.ReadLine();
      count+=1
  }
  document.write r

Just change it for your likings, try it.

0
 
LVL 8

Accepted Solution

by:
xabi earned 25 total points
ID: 2660433
Hi ManoloMa:

Here goes the code for IE4+

<HTML>
<BODY>
Page one
<P style="page-break-before: always">
Page two
</body>
</html>

xabi
0
 
LVL 8

Expert Comment

by:xabi
ID: 2660438
CJ_S:

ManoloMa is not looking for a "screen printing" just a "printer printing" :)

xabi
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:ManoloMA
ID: 2660602
Thanks CJ_S, but the solution I'm looking for is the Xabi's one.

Otherwise your code is interesant, I don't know if I can divide the score?, is it posible?

In this case I'll give you 5 pts If you want, and 20 for Xabi.

Para Xabi,

1.- Que pasa, no te llega el correo de Interactive?
2.- Has estudiado en San Sebastian?
Manolo
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2660739
Xabi: Have you actually ever seen that work???
Danny Goodman says that it might not always work in Windows, Mac is better. Since it is CSS2. perhaps NS6 also will honour it ;-)

Micel
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2660841
ManoloMa, I would appreciate the 5 points =)...*laughs*
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how can display objects ? 3 20
using js script I am trying to create a folder and copy a file 7 31
Javascript closure 1 34
Replace &lt; with < 14 54
This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now