I want to print a webpage to PDF without any margins in Safari. Page size is set to 'A4 borderless' in the print dialogue.
Whatever I seem to do, Safari on OSX is adding an extra margin around my HTML. Check 'print backgrounds' to see what I mean.
Clearly the @page-rule has no effect for Safari, but are there any other ways?
http://jsfiddle.net/willemvb/psFHC/
@page {
size: 21cm 29.7cm; /*A4*/
margin: 0; /*webkit says no*/
}
html{
margin: 0;
padding: 0;
width: 100%;
}
body {
margin: 0;
padding: 0;
font-family: sans-serif;
width: 100%;
background: #eee;
}
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…