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: printPdfBase64() #461

Open
3 of 30 tasks
davequested opened this issue Mar 17, 2025 · 2 comments
Open
3 of 30 tasks

feat: printPdfBase64() #461

davequested opened this issue Mar 17, 2025 · 2 comments
Labels

Comments

@davequested
Copy link

Plugin(s)

  • Android Battery Optimization
  • Android Dark Mode Support
  • Android Edge-to-Edge Support
  • Android Foreground Service
  • App Review
  • App Shortcuts
  • App Update
  • Asset Manager
  • Background Task
  • Badge
  • Bluetooth Low Energy
  • Cloudinary
  • Datetime Picker
  • File Compressor
  • File Opener
  • File Picker
  • Live Update
  • Managed Configurations
  • NFC
  • Photo Editor
  • Posthog
  • Printer
  • Screen Orientation
  • Screenshot
  • Speech Recognition
  • Speech Synthesis
  • Torch
  • Zip

Current problem

We're retrieving a PDF as base64 from an API and wanted to be able to directly print that on the device without having to save it to the device first. Saving to the FileSystem would require another plugin and dealing with permissions which the user may deny.

Preferred solution

Consider adding printPdfBase64() as a method to your @capawesome-team/capacitor-printer plugin.

Alternative options

No response

Additional context

No response

Before submitting

@robingenz
Copy link
Member

robingenz commented Mar 17, 2025

Thank you for your request. While we always recommend not using Base64 to prevent OOM issues (see here), I can see that such a method would be handy for small files. I'll add this to the roadmap.

@davequested
Copy link
Author

Thanks Robin, yes our use-case is very small PDFs (invoices, packing slips, etc). Thanks for considering.

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

No branches or pull requests

2 participants