This repository was archived by the owner on Aug 3, 2024. It is now read-only.
This repository was archived by the owner on Aug 3, 2024. It is now read-only.
HTML Template with multiple pages only seems to print page 1 #4
Closed
Description
Hi,
Great work on this, I have just downloaded the code and added in a test html file which spans across 10 pages however when I run it through the app only page 1 gets produced multiple times in the PDF.
I'm currently doing this
- (id<DLPRPage>)renderer:(DLPRRenderer *)renderer pageAtIndex:(NSUInteger)pageIndex {
NSError *error = nil;
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"fire" ofType:@"html"];
NSMutableString *source = [[NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&error] mutableCopy];
CGSize paperSize = [DLPRSourcePage paperSizeForISO216A:4 forOrientation:DLPRPageOrientationPortrait];
DLPRSourcePage *page = [[DLPRSourcePage alloc] initWithSource:source paperSize:paperSize];
page.paperSize = paperSize;
CGFloat insetInInches = 0.5;
CGFloat insetPixels = insetInInches * [DLPRSourcePage resolution];
page.margins = DLPRPageMarginsMakeUniform(insetPixels);
return page;
}
Any help would be appreciated,
Thanks
Metadata
Metadata
Assignees
Labels
No labels