Is ther any way to divide a html context contained div, p and table tages into separated pages in separated div tages (or at least just separated) for a defined height? (like ms word but online)
I want to create an html template for formal letters that might have multiple pages. Expected a solution by using php or javascript or just html and css.
I use a persian font not english !
By the way, is there any other ways for creating those types of templates? (not using third party websites)... If yes, please give an example.
Note that I want to create pdf and image and ms word doc from that html too!
Thanks :)
with just html and css you can achieve it. look into my below code.
<style>
@media print {
.pagebreak { page-break-before: always; } /* page-break-after works, as well */
}
</style>
<div class="container pageBreak">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Reprehenderit necessitatibus nihil incidunt officia labore blanditiis atque soluta, optio laboriosam voluptates fugit, sint porro iure deleniti eveniet dolor voluptas, possimus repellat.
</div>
<div class="container pageBreak">
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Reprehenderit necessitatibus nihil incidunt officia labore blanditiis atque soluta, optio laboriosam voluptates fugit, sint porro iure deleniti eveniet dolor voluptas, possimus repellat.
</div>
you can either use ctl + p in windows or cmd+p in mac for printing pdf