We are usingconverter in our web app but we see a couple of problems during creating the PDF file.
We use header and footer for every page and when we have let’s say a big box that does not fit on the page, it is split and moved to the next page or pages. The problem is that if we put some padding-top or margin-top, this is used only for the first page and on the every next page because of the header the text is cut off. It is like the header is put on the beginning of the text and could not be fixed with paddings or margins. See the attached images.
The other problem is that break-inside: avoid property is not working.
Here are the files attached. I am using the command for header and footer with html files (–header-html) also attached.
If you need some more information, please let me know.
Thanks for your sample files, we have checked your files and understood your problem now.
We suggest you may add some margins to header and footer areas in resultant PDF file, for example,
.exe -margin-top 20 -margin-bottom 20 D:\downloads\in.html D:\downloads\out.pdf
after you get the PDF file, you can use “PDF Stamp Command Line” to stamp header and footer text to the PDF pages, you may download “PDF Stamp Command Line” from this web page to try,
I tried to put the margin top and bottom and it was OK with the command. But when we started using the html2any we had a problem with the command “html2any.exe” and you suggested us to use the command “htmltopdf.dll” and with this one it is not working.
Also is there any other way to put the margins and header and footer so we do not need to buy another app? Also this leads to additional development work, tests and delays solving the problem.
If there is another way to solve the problem, we would like to check it also, thanks!
Thanks for your message, you can use Advanced PDF Tools GUI or Advanced PDF Tools Command Line software to increase the margins to PDF pages, please look at following web pages for more information,