Hi,
I have a dynamic page generated from data in a form that fills in a template. This works fine and displays well rendering all HTML as it should.
The issue I'm having occurs when I try to use the PDF exporting functionality. Since some pages extend over multiple pages, text at the bottom of the page overflows failing to respect margins and any padding. I have created a print-only style sheet that defines margins for the pages and padding for specific elements but the overflow is constant. Can anyone provide any guidance as to the set of standards that the PDF exporter follows and whether there is a preferred approach for achieving this type of formatting? Additionally, can someone provide similar guidance for achieving repeating headers and footers across these pages and onto the pdf? Sample code is attached:
- <style type="text/css" media="print">
-
- @page {
- margin:1.9cm;
- }
- .no-print, .no-print *
- {
- display: none !important;
- }
-
- div.box {
- margin:.75in;
- padding: 50px;
- page-break-after:avoid;
- page-break-before:avoid;
- page-break-inside:auto;
-
- }
- </style>
- div class="box">
- <h3> Titles here</h3>
- <p> Paragraph 1</p>
- <p> Paragraph 2</p>
- <p> Paragraph 3</p>
- <p> Paragraph n....</p>
- </div>
Any help would be greatly appreciated.
Thanks,
John