mercredi 1 décembre 2021

How to generate PDF from HTML with multi page header on iOS?

Right now I am generating PDF from html that loads into a web view before converting to PDF.

The HTML contains some header and table data. I want show header on every page on the PDF. How can I do that ?

To separate the page I use this code before converting to PDF.

// Generate PDF page
for (int idx = 0; idx < [printPageRenderer numberOfPages]; idx++) {
    UIGraphicsBeginPDFPage();
    [printPageRenderer drawPageAtIndex:idx inRect:UIGraphicsGetPDFContextBounds()];
}



Aucun commentaire:

Enregistrer un commentaire