Flying Saucer Pdf Page Break
Posted : adminOn 3/30/2018
Unfortunately this doesn't work. Salesforce lists this as a marked as no fix. Anti-transpirant Vst Synth. Long line of text doesn't wrap properly when PDF is generated via visualforce.
It also doesn't respect CSS word-wrap and word-break properties and those do not work properly when set to break-work and break-all, respectively. Salesforce has release a pilot version of their new improved pdf rendering engine (). Being based on a chromimum engine the output matches what debugging results in chrome and has full support for css paged media. While it does appear to have some scalability issues associated with the current version, it's stated intention is to add broader support for modern HTML standards, such as CSS3, JavaScript, and HTML5 One might reasonably hope issues like this are marked as non-fix as they're expected to be addressed by the new and improved rendering engine. However, if you're unable to join the pilot the only option is to manually implement line breaking on a case by case basis.
If you're interested in more of an algorithm the may be useful and has some examples that should be portable.
According to Flying Saucer PDF Generator and Unicode you need a special variant build of Flying. Also notice the second page-break-after inside the div. I’m using Flying Saucer/iText to generate report. Now the report has a condition that if a specific condition takes place the report should move to next page of pdf.