Answer the question
In order to leave comments, you need to log in
Why is there a duplication of the first page when printing a site if the content does not fit on one page?
Hello everyone
There is no answer to this question on the Internet.
To see it visually, you can go here service.vspbmebel.ru , go to the production tab, there "Print binding" and in the modal window click on print
If you are in chrome, you will immediately see a preview
The button itself is simple runs the windows.print() command
As you can see, the content does not fit on one page, but instead of being printed on several, it simply duplicates the first one
. At the same time, if the print should only have one page *for example, the door editor - print - print", then everything is ok
I will give all the relevant code
@media print{
h1, .constructor-header, .left-options, .main-view, .modal-header, .left-menu, .constructor-wrap{
display : none;
}
.modal-content, .constructor-wrap{
border : none;
}
.form-group{
margin-bottom : 0;
}
body.modal-open{
overflow : visible;
}
}
$(document).on("click", ".modal-header .btn-print", function() {
var height;
height = $(".modal-content:visible").height();
$("body").css('min-height', height); // хак для модальных окон
window.print();
return false;
});
page-break-before : always;
by the way, it also does not work inside the modal, despite the absence of floats from the parent
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question