Showing
1 changed file
with
4 additions
and
4 deletions
@@ -54,7 +54,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -54,7 +54,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
54 | if dynamic { | 54 | if dynamic { |
55 | semaphore.signal() | 55 | semaphore.signal() |
56 | } else { | 56 | } else { |
57 | - printing.onCompleted(printJob: self, completed: false, error: error as NSString?) | 57 | + self.printing.onCompleted(printJob: self, completed: false, error: error as NSString?) |
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
@@ -95,7 +95,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -95,7 +95,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
95 | let printer = UIPrinter(url: printerURL!) | 95 | let printer = UIPrinter(url: printerURL!) |
96 | printer.contactPrinter { available in | 96 | printer.contactPrinter { available in |
97 | if !available { | 97 | if !available { |
98 | - printing.onCompleted(printJob: self, completed: false, error: "Printer not available") | 98 | + self.printing.onCompleted(printJob: self, completed: false, error: "Printer not available") |
99 | return | 99 | return |
100 | } | 100 | } |
101 | 101 | ||
@@ -109,7 +109,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -109,7 +109,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
109 | 109 | ||
110 | override public var numberOfPages: Int { | 110 | override public var numberOfPages: Int { |
111 | if dynamic { | 111 | if dynamic { |
112 | - printing.onLayout( | 112 | + self.printing.onLayout( |
113 | printJob: self, | 113 | printJob: self, |
114 | width: paperRect.size.width, | 114 | width: paperRect.size.width, |
115 | height: paperRect.size.height, | 115 | height: paperRect.size.height, |
@@ -131,7 +131,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | @@ -131,7 +131,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate | ||
131 | print("Unable to print: \(error?.localizedDescription ?? "unknown error")") | 131 | print("Unable to print: \(error?.localizedDescription ?? "unknown error")") |
132 | } | 132 | } |
133 | 133 | ||
134 | - printing.onCompleted(printJob: self, completed: completed, error: error?.localizedDescription as NSString?) | 134 | + self.printing.onCompleted(printJob: self, completed: completed, error: error?.localizedDescription as NSString?) |
135 | } | 135 | } |
136 | 136 | ||
137 | func printPdf(name: String, withPageSize size: CGSize, andMargin margin: CGRect, withPrinter printerID: String?, dynamically dyn: Bool) { | 137 | func printPdf(name: String, withPageSize size: CGSize, andMargin margin: CGRect, withPrinter printerID: String?, dynamically dyn: Bool) { |
-
Please register or login to post a comment