Solved

Insert a FormFeed in a page

Posted on 2000-03-27
6
164 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JavaScript/CSS: Detect if hue-rotate supported by browser 1 35
how can i remove string values 2 29
how can i select 4 29
Jquery GMAP3 Hierarchy 1 24
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

785 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