Solved

Insert a FormFeed in a page

Posted on 2000-03-27
6
162 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

757 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

23 Experts available now in Live!

Get 1:1 Help Now