Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new printing output type value with print pdf method #1693

Merged
merged 3 commits into from
Jul 5, 2024

Conversation

tapeo
Copy link
Contributor

@tapeo tapeo commented Jul 5, 2024

Currently the printing package doesn't handle the print output type (only iOS side). This value allows to retrieve different paper list from the paper supported by the printer. Previously with .generic sett it couldn't be possible to use for example format like 4x6inches.
Additionally this PR include a new logic to select the paper from the printInteractionController method because it happens that the UIPrintPaper.bestPaper choose a wrong paper size even if it is available in the supported list.

let bestPaper = UIPrintPaper.bestPaper(forPageSize: currentSize!, withPapersFrom: paperList)

print("Use best paper: \(bestPaper.paperSize.width)x\(bestPaper.paperSize.height)")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the prints?

printing/ios/Classes/PrintJob.swift Show resolved Hide resolved
@DavBfr
Copy link
Owner

DavBfr commented Jul 5, 2024

I thinbk it's missing some layoutPdf implementations for tests and web

@tapeo
Copy link
Contributor Author

tapeo commented Jul 5, 2024

yes should be fixed now

@DavBfr DavBfr merged commit c5f5d1c into DavBfr:master Jul 5, 2024
5 of 6 checks passed
@DavBfr
Copy link
Owner

DavBfr commented Jul 5, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants