printing issue

M

Mouarf

hello all,

is there a way in an HTML document to specify where the page breaks must
be when printing to paper?


My software application export a report in the HTML format (both text and
pictures) and I need to ensure the loction of the page breaks on paper.

Any hint or advice?

Thanks in advance.
 
J

Jukka K. Korpela

Scripsit Mouarf:
is there a way in an HTML document to specify where the page breaks
must be when printing to paper?

Use page-break-before: always or page-break-after: always in CSS, for
suitable elements.
My software application export a report in the HTML format (both text
and pictures) and I need to ensure the loction of the page breaks on
paper.

Beware that specifically designated page breaks work well in a controlled
environment only. Issues like font size and paper size variation make it
hazardous in an open environment like the Web. You'll easily end up with
foolish printouts where a new page has just been started automatically, a
few lines printed on a fresh page, and then a page eject takes place because
your CSS code says so.
 
M

Mouarf

Scripsit Mouarf:


Use page-break-before: always or page-break-after: always in CSS, for
suitable elements.


Beware that specifically designated page breaks work well in a
controlled environment only. Issues like font size and paper size
variation make it hazardous in an open environment like the Web. You'll
easily end up with foolish printouts where a new page has just been
started automatically, a few lines printed on a fresh page, and then a
page eject takes place because your CSS code says so.


thanks a lot it helped me and this is enough. The application will not be
web and the fonts and page size will stay the standard ones. The document
will be opened by MS Word and updated by the user before printing.

More tricky: how would I place page footer and make sure that they are at
the end of the printed page?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top