printing-web-page

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

女生的网名这么多〃 提交于 2019-12-18 07:28:24
问题 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 around that allows me to prevent page breaks in Firefox (3.6) or IE versions less than 8? 回答1: Sorry, my answer is "not possible", although I'd love it if anyone can prove me wrong. I've ran into the same problem lately, and after doing a little

Print page numbers on pages when printing html

点点圈 提交于 2019-12-17 00:47:38
问题 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: bold; font-size: 2em; content: counter(page); } } I've tried to put this page rule inside @media all { *CSS code* } And outside of it, tried to put it in @media print , but nothing helped me to display the page numbers on my page. I've tried to use FireFox and

print png image to Dymo Labelwriter 450 using Dymo.Label.Framework

回眸只為那壹抹淺笑 提交于 2019-12-13 03:55:21
问题 I'm trying to print a png image to my LabelWriter 450. I tried to combine the QR example found here (which does work): QR example and the answer by Adam to another question here: png example When I run this and click on print I get no errors but nothing happens. No js errors in Chrome console. This is what I have: HTML File: <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>DYMO: Image-code</title> <!-- JQuery --> <script src =

Printing Data inside a div

谁说胖子不能爱 提交于 2019-12-12 02:28:25
问题 I have a lot of DIVs having some data in my web page & I want to print a data of a specific div by using "window.print()" without opening any popup. What should I do? 回答1: You must use CSS Media Types like this: @media print { #printable { display:block; overflow: visible; } #nonprintable { display:none; } } @media screen { body, table, tr, td { font:12px Arial, Helvetica, sans-serif; } .divStyles { width:850px; height:150px; border: 1px solid #000; background-color: #ccc; padding: 15px; } }

printing result of 2 for loops in same line

别等时光非礼了梦想. 提交于 2019-12-11 17:22:57
问题 I'm fairly new to web scraping in Python; and after reading most of the tutorials on the topic online I decided to give it a shot. I finally got one site working but the output is not formatted properly. import requests import bs4 from bs4 import BeautifulSoup import pandas as pd import time page = requests.get("https://leeweebrothers.com/our-food/lunch-boxes/#") soup = BeautifulSoup(page.text, "html.parser") for div in soup.find_all('h2'): #prints the name of the food" print(div.text) for a

IE8 Printing website zoomed in

荒凉一梦 提交于 2019-12-11 08:17:04
问题 I'm having a particularly fun issue with IE8. The website prints fine in firefox, chrome, ie9, but when printed from IE8, the page is about 50% larger than it should be, causing the right side to be cut off. This can be solved by scaling down the zoom from the print preview to 70%, but the client isn't satisfied with this solution. I haven't had any luck finding much info, or similar problems via google and SO. Does anyone have any suggestions for me? It's also hard to troubleshoot printing

Printing ExtJS charts with @media print

时间秒杀一切 提交于 2019-12-11 04:42:00
问题 I have a printing solution for ExtJS objects that seems to work great for everything except for charts. I've been using @media print CSS tip to create a "printing" div below my viewport (so it is not seen on screen, but it is the only item that is printed when a user clicks the print button). I do this so that I can control the proportionate sizing of the object so that it fits on the page nicely and so that I can remove "non-printing" elements like toolbars. When I want to print an ExtJS

print content of <iframe> which exceeds one page

ぃ、小莉子 提交于 2019-12-11 03:52:31
问题 in my react application I have an iframe which is loaded with HTML document and content of it exceeds 1 page. on pressing Ctrl+p I want to print it in several pages but the print preview only shows one page. how it should be handled to recognize that the content of iframe is more than one A4 page? the DOM in chrome devtool looks like <div class="article-container"> <iframe style="">#document /* hundreds of <p> tags */ </iframe> </div> the structure in react app is like <div className="article

printing from chrome missing lines

风流意气都作罢 提交于 2019-12-11 03:09:17
问题 When I print from Chrome some lines are missing. When I export to a PDF file and then print the file from Acrobat there are no missing lines. With Chrome for any given web page it is always the same lines that are missing. No problem printing with Explorer or Firefox . Does anybody know how to fix this? 回答1: Check margin settings in the print dialog of Chrome. Setting "Margins" to "None" might help but printer will still have some unavoidable margins. It seems to be a bug in Chrome anyways.

Table row splits across two pages (print media)

落花浮王杯 提交于 2019-12-10 19:57:13
问题 I have a table which is OK in web pages, but when printing my table ( ctrl + p ) it breaks not the way I want. The last row of the first page splits with the part of the row on the first page and the other part of the row on the second page. So, is there any way to overcome the problem, the rows can have different content and size. I also tried this properties page-break-before/after: auto. page-break-inside:avoid; but with no result. Is there any way to break the table and move the part of