Skip to content

Commit 6a079fe

Browse files
jdaoliveirajose.oliveirachristopherdro
authored
Fix IOS paddingTop being on the wrong place on CGRectMake (#161)
* Fix IOS paddingTop being on the wrong place on CGRectMake * Add Promise.reject more times, change loadData to loadDataWithBaseURL to fix pdf getting stuck * Add Promise.reject more times, change loadData to loadDataWithBaseURL to fix pdf getting stuck * Update PdfConverter.java Co-authored-by: Mac <> Co-authored-by: jose.oliveira <[email protected]> Co-authored-by: Christopher Dro <[email protected]>
1 parent c0e57ac commit 6a079fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/RNHTMLtoPDF/RNHTMLtoPDF.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ -(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigati
191191
// Define the printableRect and paperRect
192192
// If the printableRect defines the printable area of the page
193193
CGRect paperRect = CGRectMake(0, 0, _PDFSize.width, _PDFSize.height);
194-
CGRect printableRect = CGRectMake(_paddingTop, _paddingLeft, _PDFSize.width-(_paddingLeft + _paddingRight), _PDFSize.height-(_paddingBottom + _paddingTop));
194+
CGRect printableRect = CGRectMake(_paddingLeft, _paddingTop, _PDFSize.width-(_paddingLeft + _paddingRight), _PDFSize.height-(_paddingBottom + _paddingTop));
195195

196196

197197
[render setValue:[NSValue valueWithCGRect:paperRect] forKey:@"paperRect"];

0 commit comments

Comments
 (0)