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
David PHAM-VAN
2024-11-28 07:11:47 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d336536b9e72ba399ece0c631df65796f5f094a9
d336536b
1 parent
9f213a87
Fix formatting
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
printing/macos/Classes/PrintJob.swift
printing/macos/Classes/PrintJob.swift
View file @
d336536
...
...
@@ -238,11 +238,11 @@ public class PrintJob: NSView, NSSharingServicePickerDelegate {
DispatchQueue
.
main
.
asyncAfter
(
deadline
:
when
)
{
webView
.
createPDF
{
result
in
switch
result
{
case
.
success
(
let
data
):
case
let
.
success
(
data
):
self
.
printing
.
onHtmlRendered
(
printJob
:
self
,
pdfData
:
data
)
let
fileManager
=
FileManager
.
default
try
?
fileManager
.
removeItem
(
atPath
:
tempFile
)
case
.
failure
(
let
error
):
case
let
.
failure
(
error
):
self
.
printing
.
onHtmlError
(
printJob
:
self
,
error
:
"Unable to create PDF:
\(
error
.
localizedDescription
)
"
)
}
}
...
...
@@ -306,7 +306,7 @@ public class PrintJob: NSView, NSSharingServicePickerDelegate {
var
html
=
false
if
#available(macOS 11.0, *)
{
html
=
true
}
}
let
data
:
NSDictionary
=
[
"directPrint"
:
true
,
"dynamicLayout"
:
true
,
...
...
Please
register
or
login
to post a comment