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
AlhasanAlQaisi
2023-04-29 03:51:08 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2023-04-29 12:03:15 +0000
Commit
8622b2a538a84f547da80169932fab656d327240
8622b2a5
1 parent
4c45977d
fix: wrong format in directPrintPdf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
printing/ios/Classes/PrintJob.swift
printing/ios/Classes/PrintJob.swift
View file @
8622b2a
...
...
@@ -134,13 +134,15 @@ public class PrintJob: UIPrintPageRenderer, UIPrintInteractionControllerDelegate
printing
.
onCompleted
(
printJob
:
self
,
completed
:
completed
,
error
:
error
?
.
localizedDescription
as
NSString
?)
}
public
func
printInteractionController
(
_
printInteractionController
:
UIPrintInteractionController
,
cutLengthFor
paper
:
UIPrintPaper
)
->
CGFloat
{
if
currentSize
==
nil
{
return
paper
.
paperSize
.
height
public
func
printInteractionController
(
_
printController
:
UIPrintInteractionController
,
choosePaper
paperList
:
[
UIPrintPaper
])
->
UIPrintPaper
{
if
currentSize
==
nil
{
return
paperList
[
0
]
}
return
currentSize
!.
height
let
bestPaper
=
UIPrintPaper
.
bestPaper
(
forPageSize
:
currentSize
!
,
withPapersFrom
:
paperList
)
return
bestPaper
}
func
printPdf
(
name
:
String
,
withPageSize
size
:
CGSize
,
andMargin
margin
:
CGRect
,
withPrinter
printerID
:
String
?,
dynamically
dyn
:
Bool
)
{
...
...
Please
register
or
login
to post a comment