Jump to content

Printing from website


focus
 Share

This topic is 7560 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This is a general HTML/web issue: forget trying to make web pages appear identical to Word or other printed documents. They cannot, unless the original doc is scanned and printed as a graphic, which is NOT an efficient way of doing it. Accept that different browsers/OS combinations will vary the look of the page, make a design that can handle these variations elegantly, and get over it.

Somebody will suggest PDF... this is another issue. Some will advocate it, others not. (I am the latter.) Try it and see how it works for you.

Link to comment
Share on other sites

if you are displaying many records on one page you could use CSS (cascading style sheets) to cause a page break between each record when they are printed, if you only wanted one record printed on each page.. i have never done it myself, but i have read about how it can be done, and i am currently working on how to do it for one of my databases..

[This message has been edited by bman (edited February 06, 2001).]

Link to comment
Share on other sites

css with javascript can be used for that... i have it working on my page..

on my page i display all the records in my database.. and i have it create a page break after every three records when it is printed... that way it wont print half a record on the bottom of one page and the other half on the top of the next page.

its a very simple code i could post it if you like..

Link to comment
Share on other sites

ok.. now that i am back at work, here is the code.

put this between the head tags on you page

code:


<style>

P.breakit {page-break-after: always}

</style>

then anywhere you want a new page to start when you print put this code

code:


<p class="breakit"></p>

So.. if you wanted it to break after every Record when printing then you would put the break code (<p class="breakit"></p> ) after the code that displays your record, but make sure you keep it between the [FMP-record][/FMP-record] tags..

code:


[FMP-record]

[code to display record goes here.]

<p class="breakit"></p>

[/FMP-record]

I have also made a simple javascript to go with this to make it break after every 3 records (the script can be easily changed to any number of records). With the one i am using, when i print the report of all the records i get exactly 3 records per page. Without this code it would give me a page break in awkward places giving 3 and 1/2 records per page, which would just look awful.

NOTE: This will only work in IE 4.0 and above, It will NOT work in Netscape.

NOTE II: You must be using Custom Web Publishing, this can't be dont with instant web publishing.

[ February 19, 2002, 07:51 AM: Message edited by: bman ]

Link to comment
Share on other sites

This topic is 7560 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.