Closed fradiocey closed 8 years ago
You can edit printToPDF
to add support for this. It's more of an iOS draw issue then.
Hi, Im still unable to do, can you help me to convert NSLog "Number of Page:" to be displayed on PDF canvas on the footer, your help is much appreciated.
(NSData) printToPDF { NSMutableData pdfData = [NSMutableData data];
UIGraphicsBeginPDFContextToData( pdfData, self.paperRect, nil );
[self prepareForDrawingPages: NSMakeRange(0, self.numberOfPages)];
CGRect bounds = UIGraphicsGetPDFContextBounds();
for ( int i = 0 ; i < self.numberOfPages ; i++ ) { UIGraphicsBeginPDFPage();
NSLog(@"Number of page: %d",i);
[self drawPageAtIndex: i inRect: bounds];
}
UIGraphicsEndPDFContext();
return pdfData; }
Hi, Im new in Objective-c, currently I use this plugin to cordova as Moderna did. can you share me how to display page number for every PDF pages. Thanks
https://github.com/moderna/cordova-plugin-html2pdf/tree/master/src/ios/NDHTMLtoPDF