UIPrintPageRenderer / HTML to PDF error: additional free space added in PDF rendering

We have a problem using UIPrintPageRenderer when rendering HTML on a UIWebview to PDF page. HTML contains a table with several rows (....) whose height is known.

UIWebView renders this HTML well, but once converted to PDF via UIPrintPageRenderer, it happens that extra spaces are added between the lines. See an example with two rows of a table. Extra space has been added to PDF, while it does not exist in HTML. enter image description here We use this library: https://github.com/iclems/iOS-htmltopdf Any help would be nice. Regards, Morgan.

+4
source share
1 answer

use CSS in your html and specialize in a specific height

body {
margin : 0;
}
0
source

All Articles