dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

Allowing direct output to print dialog when trying to print from Flutter PWA

Open kcin9 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Currently Printing.layoutPdf only send the pdf to the browse and let it decide in what way to handle it. In my case, using iOS device, resulted in a new tab with the pdf BLOB. Redundant of procedures are required to complete the printing action. (i.e. click "Share" -> "Print" -> "Print")

Describe the solution you'd like By utilizing Javascript .print(), we can send the iframe content directly to the print dialog. Perhaps we can consider to provide an interface for such behaviour for the dart pdf file case as well?

kcin9 avatar Aug 09 '21 11:08 kcin9

If you find a solution, please create a PR.

DavBfr avatar Aug 09 '21 11:08 DavBfr

I have the same issue. When creating a PDF on Flutter Web with an iOS Device, the default option for sharing is "blob:myurl" - so when using this via WhatsApp etc it will not work - the user has to select the Share-Options in the Dialog and have to switch from "auto" to "pdf".

Is there a way to make pdf default and ignore the blob? For now it's intuitiv and my users are not able to work with this. Thanks!

t-kietzmann avatar Nov 17 '22 12:11 t-kietzmann

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Apr 15 '23 00:04 github-actions[bot]

Closing this stale issue because it has no activity.

github-actions[bot] avatar Apr 21 '23 00:04 github-actions[bot]