UIPrintPageRenderer / HTML to PDF issue : extra blank space added in rendered PDF

977 Views Asked by At

We have an issue using UIPrintPageRenderer while rendering an HTML in UIWebview to PDF page. The HTML contains a table with multiple rows (....) whose heights are known.

The UIWebView well renders that HTML but once transformed in PDF through UIPrintPageRenderer, it happens that extra spaces are added between rows. See exemple attached with 2 rows of a table. An extra space has been added in the PDF whereas it doesn't exist in the HTML. enter image description here We use that library : https://github.com/iclems/iOS-htmltopdf Any help would be nice. Regards, Morgan.

1

There are 1 best solutions below

0
On

use CSS in your html and specialise with a specific height

body {
margin : 0;
}