Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Cedric Tegenkamp
2022-03-16 13:25:18 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2022-03-17 05:56:38 -0300
Commit
091cd3755db9f9dab5c2cf34da97e30bc1de46b4
091cd375
1 parent
ecaba571
use self.printing #977
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
printing/ios/Classes/PrintJob.swift
printing/ios/Classes/PrintJob.swift
View file @
091cd37
...
...
@@ -54,7 +54,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
if
dynamic
{
semaphore
.
signal
()
}
else
{
printing
.
onCompleted
(
printJob
:
self
,
completed
:
false
,
error
:
error
as
NSString
?)
self
.
printing
.
onCompleted
(
printJob
:
self
,
completed
:
false
,
error
:
error
as
NSString
?)
}
}
...
...
@@ -95,7 +95,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
let
printer
=
UIPrinter
(
url
:
printerURL
!
)
printer
.
contactPrinter
{
available
in
if
!
available
{
printing
.
onCompleted
(
printJob
:
self
,
completed
:
false
,
error
:
"Printer not available"
)
self
.
printing
.
onCompleted
(
printJob
:
self
,
completed
:
false
,
error
:
"Printer not available"
)
return
}
...
...
@@ -109,7 +109,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
override
public
var
numberOfPages
:
Int
{
if
dynamic
{
printing
.
onLayout
(
self
.
printing
.
onLayout
(
printJob
:
self
,
width
:
paperRect
.
size
.
width
,
height
:
paperRect
.
size
.
height
,
...
...
@@ -131,7 +131,7 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
print
(
"Unable to print:
\(
error
?
.
localizedDescription
??
"unknown error"
)
"
)
}
printing
.
onCompleted
(
printJob
:
self
,
completed
:
completed
,
error
:
error
?
.
localizedDescription
as
NSString
?)
self
.
printing
.
onCompleted
(
printJob
:
self
,
completed
:
completed
,
error
:
error
?
.
localizedDescription
as
NSString
?)
}
func
printPdf
(
name
:
String
,
withPageSize
size
:
CGSize
,
andMargin
margin
:
CGRect
,
withPrinter
printerID
:
String
?,
dynamically
dyn
:
Bool
)
{
...
...
Please
register
or
login
to post a comment