html - Rotativa generated PDF doesn't render correctly - page break/element break -
i've been turning web upside down past hour or can't seem find solution rendering problem.
i'm using rotativa (1.6.4) pdf creation library capable reproduce html threw @ 100% accuracy. why almost; because seems charts i'm converting pdf cause problems when chart doesn't fit page , should transferred next page. check screenshot more details.
as can seen screenshot 1 chart overlapping happens for, me, unknown reason.
i tried adding suggested page breakers without help:
.page-breaker { display: block; clear: both; page-break-after: always; }
wrappers around charts have following css rules:
.chartcontainer { float: left; clear: both; width: 100%; height: 350px; margin: 20px auto; page-break-before: always; page-break-after: always; }
not pdf generated rotativa render incorrectly, same thing goes print preview in chrome. so, problem somewhere between page breaks , css - solution still out there.
any appreciated.
forget adding page-break-before or page-break-after. solution add page-break-inside: avoid !important rule. rule should added container/wrapper of elements broken in page break.
Comments
Post a Comment