diff --git a/src/ios/APPPrinterRenderer.m b/src/ios/APPPrinterRenderer.m index a0e0133..8edbe8b 100644 --- a/src/ios/APPPrinterRenderer.m +++ b/src/ios/APPPrinterRenderer.m @@ -66,6 +66,14 @@ return self; } +- (NSInteger) numberOfPages +{ + NSInteger num = [super numberOfPages]; + id maxPages = _settings[@"maxPages"]; + + return maxPages ? MIN(num, [maxPages longValue]) : num; +} + #pragma mark - #pragma mark Callbacks