Вопрос

I have created a PDF from HTML. I followed this question and the answer here to create PDF. HTML to PDF conversion on iOS?

My problem is a blank page gets inserted if I give a page break after the html table. The page break works properly as expected in other cases. The html table is dynamic, hence I cannot do without a page break here.

Is it possible to check if a page is blank while printing? I mean in the printToPDF() method in the answer above.

Also, the table rows break sometimes cutting a row in half, making it unreadable. It splits the row into two pages, making it look unprofessional.

Any ideas would help to deal with this would be of great help.

Thanks!

Это было полезно?

Решение

The only workaround I found was to split the PDF into 2.Till the html table end it is the first PDF, and after that the second. Then merged the two and got a final PDF without any blank pages

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top