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

feat(printer): add web support #331

Closed
3 of 24 tasks
macsupport opened this issue Nov 22, 2024 · 4 comments
Closed
3 of 24 tasks

feat(printer): add web support #331

macsupport opened this issue Nov 22, 2024 · 4 comments
Assignees
Labels

Comments

@macsupport
Copy link

macsupport commented Nov 22, 2024

Plugin(s)

  • Android Foreground Service
  • Android Battery Optimization
  • App Review
  • App Update
  • Background Task
  • Badge
  • Bluetooth Low Energy
  • Cloudinary
  • Datetime Picker
  • File Compressor
  • File Opener
  • File Picker
  • Live Update
  • Managed Configurations
  • NFC
  • Photo Editor
  • Printer
  • Screen Orientation
  • Speech Recognition
  • Speech Synthesis
  • Torch
  • Zip

Current problem

Printer plugin does not include web

Preferred solution

Have printer plugin support iOS, Android and Web.

Alternative options

It would be a great option to add the ability to print a specific element in the Webview. Ideally targeted by an 'id'. The old Cordova printer plugin was able to do this, I think.

https://github.com/katzer/cordova-plugin-printer

Additional context

No response

Before submitting

@macsupport macsupport changed the title feat: feat(printer): add web support Nov 22, 2024
@robingenz
Copy link
Member

Thank you for your request! So is your issue about the web platform being supported or that you can select a specific element by ID when printing the WebView on Android and iOS? These are two different things.

@macsupport
Copy link
Author

macsupport commented Nov 22, 2024 via email

@robingenz
Copy link
Member

Thanks for the clarification. I will have a look at the issue at the weekend. That shouldn't be too much work.

@robingenz robingenz self-assigned this Nov 22, 2024
@robingenz robingenz added the platform: web Web platform label Nov 22, 2024
@robingenz
Copy link
Member

@macsupport I've just added web support for the printWebView() method. You can use a print style sheet to customize the print output, see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Printing.

Feel free to give it a try using the following dev version:

npm i @capawesome-team/[email protected]

Let me know if you encounter any issues.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants