PDF Export in Bubble
Overview
PDF Export lets you convert HTML content or web pages to PDF directly within your Bubble applications. Bubble is a powerful no-code platform for building web applications. No coding required - simply install the plugin, connect your PDFCrowd account, and automate PDF generation.
Perfect for: Generating invoices, reports, receipts, contracts, and any document that needs to be created automatically from HTML templates or web page content.
Key Features
- URL to PDF: Convert any publicly accessible web page to PDF
- HTML to PDF: Convert raw HTML content from your Bubble app
- Seamless Bubble integration: Use dynamic data from your Bubble database in PDF generation
- Full customization: Control page size, margins, headers, footers, and more
- File output: Get a downloadable PDF file URL to use in your workflows
How It Works
- Install the "PDF Export by PDFCrowd" plugin
- Connect your PDFCrowd account
- Add a workflow action to convert URL or HTML to PDF
- Configure PDF options (optional)
- Use the generated PDF file in your app
Quick Start
The following examples demonstrate how to use the PDFCrowd Bubble plugin to convert HTML to PDF.
Note: You'll need a PDFCrowd account with API access.
For testing, you can use username demo and API key demo.
Sign up to get your own API credentials.
Example 1: Convert a URL to PDF
The simplest use case - convert a web page URL to PDF. This works for any publicly accessible URL.
Workflow Configuration
| Action: | Export URL to PDF |
| Parameters: |
url: https://example.com/invoice/123
|
The action returns the PDF file data. You can save it to your Bubble database or provide it as a download to the user.
Example 2: Convert HTML String to PDF
Convert HTML content directly - useful when generating PDFs from templates or dynamic content in your Bubble app.
Workflow Configuration
| Action: | Export HTML String to PDF |
| Parameters: |
|
Use Bubble's dynamic data to generate HTML content from your database records or user inputs.
Example 3: Upload and Convert HTML File
Upload an HTML file for conversion - useful for batch processing or converting existing documents stored in your Bubble app.
Workflow Configuration
| Action: | Export File to PDF |
| Parameters: |
file: Select a file from your Bubble file uploader or database
|
Authentication
Setting Up Your PDFCrowd Credentials
The PDFCrowd Bubble plugin uses your PDFCrowd API credentials for authentication. The plugin is configured to use your credentials from the plugin settings.
Required Credentials
- username
- Your PDFCrowd username - the same username you use to log in to your PDFCrowd account.
- api_key
- Your PDFCrowd API key (not your account password). To get your API key, choose a license plan that includes API access.
Setting Up Credentials in Bubble
- In your Bubble app, go to the Plugins tab
- Find the PDF Export by PDFCrowd plugin
- Enter your credentials:
username- set to your PDFCrowd usernameapi_key- set to your PDFCrowd API key
- Save the plugin settings
Security Notes
- Your API key is stored securely in Bubble's plugin settings.
- You can regenerate your API key anytime from your PDFCrowd account if needed.
- Each API request counts against your account's usage limits.
Error Handling
When a conversion fails, the plugin returns an error message explaining what went wrong.
Common Errors
401 Unauthorized- Invalid username or API key. Verify your credentials in the Bubble plugin settings. Make sure you're using your API key, not your account password.
403 Forbidden- Service suspended or insufficient credits. Check your PDFCrowd account for credit balance and account status.
400 Bad Request-
Invalid parameters or missing required fields. Check that you've provided
either a
url,text, orfileparameter. 430 Too Many Concurrent Requests- Too many simultaneous conversions. Your plan has a limit on concurrent requests. Wait for current conversions to complete or upgrade your plan.
For more information on status codes, see our status codes reference.
Debugging Tips
- Check the workflow debugger: Bubble's debugger shows detailed error messages from the plugin.
- Verify authentication: Double-check your username and API key in the plugin settings.
- Test URLs manually: Before converting, test your URL in our API Playground to verify it converts correctly.
- Simplify first: Start with minimal parameters and add options one at a time to identify problematic settings.
Handling Errors in Workflows
You can handle errors in your Bubble workflows by checking the action's result and displaying appropriate messages to users:
- Use conditional actions to check if the conversion succeeded
- Display user-friendly error messages when conversions fail
- Log errors for debugging purposes
Troubleshooting
Common issues and solutions when using PDFCrowd with Bubble.
Connection Issues
- Verify you're using your API key, not your account password
- If you changed your API key in PDFCrowd, update it in the plugin settings
- Try regenerating your API key and reconnecting
Conversion Issues
PDF looks different than expected
- Missing styles: The page may rely on styles that don't load during conversion. Try the Content Viewport Width option to adjust rendering width.
- Dynamic content: JavaScript-generated content may not render. Use the Wait For Element or Javascript Delay options to allow content to load.
- Login required: Pages behind authentication require cookies to be set. Use the Cookies option to pass session cookies.
Images not appearing
- Ensure images use absolute URLs (not relative paths)
- Check that images are publicly accessible
- Some images may be lazy-loaded - use Content Viewport Height set to
large
Conversion is slow
- Large pages with many images take longer to process
- Pages with heavy JavaScript may need time to render
- Consider using simpler HTML templates for faster conversion
Output Issues
Can't use PDF file in workflow
The PDFCrowd plugin outputs a temporary file URL. Some Bubble elements may have limitations on accepting file URLs. In such cases:
- Save the file to your Bubble database first
- Use the URL directly in a download link or external service
File name incorrect
Set the Output Filename field to customize the PDF filename.
You can use dynamic data from your Bubble app to create dynamic filenames.
Getting Help
- PDFCrowd Support: Contact us for API-related questions
- API Playground: Test conversions in our API Playground to verify settings before using in Bubble
- Bubble Forum: Bubble Community Forum for plugin-related questions
Bubble Reference
Refer for details to the Bubble Reference.