Questions tagged [printing-web-page]

Printing a web page either on paper or as a .PDF file, usually through the browser.

236 questions
97
votes
10 answers

Print page numbers on pages when printing html

I've read a lot of web-sites about printing page numbers, but still I couldn't make it display for my html page when I try to print it. So the CSS code is next: @page { margin: 10%; @top-center { font-family: sans-serif; font-weight:…
Donvino
  • 2,407
  • 3
  • 25
  • 34
38
votes
4 answers

scale html table before printing using css

I have a table as the entire content of an HTML document (for legitimate table purposes...it is table data, not for layout). Some cells have widths and heights specified (not through css but using the old sizing inline in a table structure), but…
techtheatre
  • 5,678
  • 7
  • 31
  • 51
19
votes
7 answers

Specify hairline thickness in CSS for printing

If I have a print CSS styling an element with: border:1px solid black; or: border:0.25pt solid black; The line is very thick when it prints – at least 1pt. If I try a much smaller value, such as 0.05pt, the line doesn't appear at all. How can I…
user535673
  • 908
  • 1
  • 9
  • 13
19
votes
4 answers

page-break-inside:avoid equivalent for Firefox and/or IE

I understand that the CSS page-break-inside:avoid instruction is supposed to prevent a page break within a div when an HTML document is printed. Through searching the internet, I have found that it is only supported by Opera and IE8. Is there a work…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
18
votes
5 answers

Determine If Print/Cancel Button in Google Chrome's Print Preview is Clicked

I've been printing my page using the code below: window.print(); An image below is what the print preview in Google chrome browser looks like. It has two main buttons: print and cancel. I want to know if the user has clicked the print or cancel…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
16
votes
6 answers

Set printer paper size through css

My printer default size is A4,and I need to print payslip in size 8.5inx5.5in using the old dot matrix printer. I tried to set every payslip DIV in a fixed height, width: 175.6mm; height:123.7mm; margin-left:auto; margin-right:auto; Although it fit…
Irene Ling
  • 1,881
  • 3
  • 26
  • 41
16
votes
6 answers

text-shadow and box-shadow while printing (Chrome)

I'm making some printable calendar website using HTML, CSS and JS. Unfortunately I cannot use CSS property called text-shadow, because shadow behind text prints as solid black text without any blur or transparency. Same problem occurs when I'm…
hogancool
  • 411
  • 2
  • 4
  • 8
15
votes
4 answers

Alternative for page-break-inside: avoid

I have a page which generates coupons. Each coupon is a div with a height varying depending on the content. I want to print as many coupons on each page as possible, but I do not want the coupons to be split out over several pages. The CSS property…
joh-3
15
votes
1 answer

Change document flow on page break to fill space

When printing (or, in general, displaying document on paged media), is it possible to reflow document elements so that when some element (eg. image) is shifted to next page because it doesn't fit in available space on actual page, elements following…
FurloSK
  • 441
  • 2
  • 14
14
votes
5 answers

Remove the default browser header and footer when printing HTML

I got an HTML with the . The question I'm trying to ask is: Is there any way to remove the strings that the web browsers add to the printed page? Such as: Web site from where the page was printed Page count Title of…
fmsf
  • 36,317
  • 49
  • 147
  • 195
11
votes
3 answers

Two column layout for printing

I have a web site with a lot of text. To make it more readable when printed, I'd like to create a paginated two-column layout, that is I want two columns per page and the text of column one should wrap to column two and from that to the next page…
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
10
votes
5 answers

Scroll bars showing on printed page in IE9?

I'm having an issue with IE9 showing horizontal scroll bars on a printed page even though the contents of the page fit entirely. I've tried several things to remove them in my print css. Has anyone else had this issue and found a way around it?
Ryan
  • 1,368
  • 2
  • 10
  • 14
9
votes
13 answers

What page-image generating technology should I use?

I'm building a desktop application right now that presents its human-readable output as XHTML displayed in a WebBrowser control. Eventually, this output is going to have to be converted from an XHTML file to a document image in an imaging system. …
Robert Rossney
  • 94,622
  • 24
  • 146
  • 218
9
votes
3 answers

Print Stylesheets for pages with long horizontal tables

I have a page that spits out db data in long horizontal tables. I need to print it nicely so it does not cut off. Any tips ?
Boris Smirnov
  • 1,217
  • 4
  • 15
  • 27
9
votes
3 answers

Bootstrap 3 Pages Printing Mobile Version

When we print pages from our web site, which is based on Bootstrap 3, they are printing on some browsers showing the mobile version. I have Googled to try and find a good solution, but not really found anything that works. Using the same CSS for…
Tony Payne
  • 382
  • 2
  • 10
1
2 3
15 16