David PHAM-VAN

Fix Html to Pdf paper size on iOS

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## 2.1.4 3 ## 2.1.4
4 4
5 - Update example to show saved documents on iOS Files app 5 - Update example to show saved documents on iOS Files app
  6 +- Fix Html to Pdf paper size on iOS
6 7
7 ## 2.1.3 8 ## 2.1.3
8 9
@@ -166,7 +166,7 @@ public class SwiftPrintingPlugin: NSObject, FlutterPlugin, UIPrintInteractionCon @@ -166,7 +166,7 @@ public class SwiftPrintingPlugin: NSObject, FlutterPlugin, UIPrintInteractionCon
166 166
167 // create pdf context and draw each page 167 // create pdf context and draw each page
168 let pdfData = NSMutableData() 168 let pdfData = NSMutableData()
169 - UIGraphicsBeginPDFContextToData(pdfData, .zero, nil) 169 + UIGraphicsBeginPDFContextToData(pdfData, rect, nil)
170 170
171 for i in 0 ..< renderer.numberOfPages { 171 for i in 0 ..< renderer.numberOfPages {
172 UIGraphicsBeginPDFPage() 172 UIGraphicsBeginPDFPage()