Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Insert a FormFeed in a page

Posted on 2000-03-27
6
165 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

829 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