Or concat some PDFs in juste one ?!
no. please use another tool for that.
@fouzko Yes, it's possible to print different pages in one pdf with css - depending on how your html is setup.
With a structure like this:
<style>
.page { page-break-before: always }
</style>
<div class="page">
...
</div>
<div class="page">
...
</div>
...anything contained within those page divs would be different pages in the PDF. I know this isn't exactly what you're asking, but the closest way to simulate "multiple" pdfs.
@scurker
Helped a lot.
Cheers.
We really should put together some best practices. Abd write down all the limitations. Phantomjs and also chromium have many limitations which aren鈥檛 that obvious.
Mine are still seeming to ignore these break rules. Would the fact I'm using A4 size make a difference to how this would behave?
I also tried this additional to scurker's answer:
page[size="A4"] {
background: white;
width: 21cm;
height: 29.7cm;
display: block;
margin: 0 auto;
margin-bottom: 0.5cm;
}
@media print {
body, page[size="A4"] {
margin: 0;
box-shadow: 0;
}
}
<page size="A4">
<div class="page">
/// content
</div>
</page>
Edit: ignore me... for some reason it's working now. I also set the html zoom level to 0.68 as recommended here:
https://github.com/ariya/phantomjs/issues/12685
Thanks It did help!
Thanks @scurker
<style>
.page { page-break-before: always }
</style> helped my a lot
Most helpful comment
@fouzko Yes, it's possible to print different pages in one pdf with css - depending on how your html is setup.
With a structure like this:
...anything contained within those page divs would be different pages in the PDF. I know this isn't exactly what you're asking, but the closest way to simulate "multiple" pdfs.