Hi fellow bubblers,
I built and released a new plugin that connects to the PrintNode API and allows you to print remotely.
This way you can trigger a printing job for a file in your databse on a printer that’s connected to a user’s computer from your app without going through the browsers printing dialog.
We are using it to automatically print shipping documents & labels from our packing stations for ecommerce shipments that are being packed in our warehouse.
Here’s a quick rundown on how to set it up:
-
Sign up for an account on Remote Printing for Web Apps | PrintNode
-
Download the Printnode client for the computer you want to print from, install it & log in
-
After installation, the device and any installed printers will appear in the “Devices”-overview in your PrintNode dashboard.
-
Copy your API key from the “API Keys” section in your PrintNode account
-
Install the PrintNode plugin in your bubble app.
-
Paste the API Key in the relevant fields.
Awesome! You’re all set up.
The plugin currently performs three actions: You can request a list of printers and submit printing jobs to your printer (with or without enhanced printing options).
How to send a basic printing job
Add a new action “Printnode - Print Document” and fill out the fields with the following info:
Printer_ID - id of your printer, you can find this ID in your Printnode app under “Devices” next to the respective printers name (usually an eight-digit number) REQUIRED
Printout_Title - the name of the document you want to print REQUIRED
Printout_URL - the URL where the document you wish to print can be found (this can be a PDF document or a RAW file, if you want to print from a printer that supports this) REQUIRED
print_source Where this print originated from (e.g. “my bubble app”) REQUIRED
content_type - You can print PDF (set to “pdf_uri”)and RAW (set to “raw_uri”) files from their URL or post base64 encoded PDF (set to “pdf_base64”) and RAW (set to “raw_base64”) files as text strings. Posting base64 encoded content is not recommended because the endpoint can time out and the file won’t be printed. REQUIRED
The workflow action will return the printjob’s id.
If you want to set up more options for the printjob, you can use the “Print Document (with Options)” workflow action and set up things like page rotation, select the paper tray of the printer, etc.
For more info, please feel free to ask questions here or refer to the printnode API documentation.
Happy printing!