PdfCrowd Integration with SmythOS
Need to convert documents and web pages within your workflows? Connect PdfCrowd to SmythOS and empower your agents to automatically convert HTML, images, and PDFs with a professional, cloud-based service.
List of PdfCrowd Components
Quickly compare PdfCrowd components by what they do and their key I/O. Click any component name to jump directly to its detailed guide.
Component | Action | What it Does | Inputs | Key Outputs | Use Case |
---|---|---|---|---|---|
HTML to PDF | Convert | Converts a live webpage or HTML file into a PDF document. | required webpage/file_url | url | Archiving a webpage or generating a PDF report from an HTML template. |
Image to PDF | Convert | Converts an image file (e.g., JPG, PNG) into a PDF document. | required file_url | url | Combining multiple scanned image receipts into a single PDF expense report. |
PDF to Text | Extract | Extracts the plain text content from a PDF document. | required file_url | Response (text) | Analyzing the content of a PDF for keywords or summarization. |
PDF to HTML | Convert | Converts a PDF document back into an HTML file. | required file_url | Response (HTML) | Making the content of a PDF web-viewable or easier to parse. |
Prerequisites
Before you begin, please ensure you have the following:
- An active SmythOS account. (Sign up here).
- A PdfCrowd account.
- Your PdfCrowd Username and API Key.
Getting Started With PdfCrowd
The connection between SmythOS and PdfCrowd is configured using your Username and API Key, which must be Base64 encoded.
Step 1: Get Your PdfCrowd Credentials
- Sign up for a PdfCrowd account.
- Your Username is the email you used to register.
- Navigate to your Account page to find your API Key.
Step 2: Base64 Encode Your Credentials
The API uses Basic Authentication. You need to combine your credentials and Base64 encode them.
- Combine your credentials into a single string with a colon in between:
YOUR_USERNAME:YOUR_API_KEY
. - Use a Base64 encoding tool (like the "Encode/Decode" component in SmythOS) to encode this entire string.
- Copy the resulting Base64 encoded string.
Step 3: Store Your Encoded Key in SmythOS Vault
Your encoded key is a sensitive credential. Use the SmythOS Vault
to store it securely.
- In your SmythOS dashboard, navigate to the Vault.
- Create a new secret and paste your Base64 encoded string as the value. Give it a memorable name, like
pdfcrowd_base64_auth
. - For more details, see the Vault Documentation.
Step 4: Configure a PdfCrowd Component
- In your SmythOS agent graph, drag and drop any PdfCrowd component.
- Click the component to open its Settings panel.
- In the authentication field (e.g.,
Base64 Encoded Username and API Key
), select the secret you saved in the Vault. - Your connection is now configured for that component.
Which PdfCrowd Component Should I Use?
If you need to… | Target | Use this Component | Why this one? |
---|---|---|---|
Create a PDF snapshot of a website | A URL | HTML to PDF | The standard way to convert any live webpage into a PDF document. |
Combine images into a single PDF | An image file URL | Image to PDF | Specifically designed to take image formats and convert them to PDF. |
Extract all the text from a PDF report | A PDF file URL | PDF to Text | The best way to get clean, plain text from a PDF for further processing. |
Make a PDF's content editable as HTML | A PDF file URL | PDF to HTML | Converts the PDF structure back into HTML code. |
Component Details
This section provides detailed information for each PdfCrowd component.
HTML to PDF
Converts a webpage or raw HTML file, accessible via a URL, into a PDF document.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
webpage/file_url | string | Yes | The public URL of the webpage or HTML file to convert. |
Outputs
Field | Type | Description |
---|---|---|
url | string | A temporary URL to download the generated PDF file. |
size | integer | The size of the generated PDF in bytes. |
mimetype | string | The MIME type of the output file (application/pdf ). |
Response | object | The raw JSON response from the PdfCrowd API. |
{
"component": "pdfcrowd.htmlToPdf",
"webpage/file_url": "[https://www.example.com](https://www.example.com)"
}
Image to PDF
Converts an image file, accessible via a URL, into a PDF document.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
file_url | string | Yes | The public URL of the image file (e.g., PNG, JPG) to convert. |
Outputs
Field | Type | Description |
---|---|---|
url | string | A temporary URL to download the generated PDF file. |
size | integer | The size of the generated PDF in bytes. |
mimetype | string | The MIME type of the output file (application/pdf ). |
Response | object | The raw JSON response from the PdfCrowd API. |
PDF to Text
Extracts plain text content from a PDF document accessible via a URL.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
file_url | string | Yes | The public URL of the PDF file to extract text from. |
Outputs
Field | Type | Description |
---|---|---|
Response | string | The extracted plain text content from the PDF. |
Headers | object | The HTTP headers from the API response. |
PDF to HTML
Converts a PDF document, accessible via a URL, into an HTML document.
Inputs
Field | Type | Required | Notes |
---|---|---|---|
file_url | string | Yes | The public URL of the PDF file to convert. |
Outputs
Field | Type | Description |
---|---|---|
Response | string | The converted HTML content. |
Headers | object | The HTTP headers from the API response. |
Best Practices & Advanced Tips
- Secure Your Credentials: Always store your Base64-encoded
username:api_key
string in the SmythOSVault
. - Use Public URLs: All input URLs (
file_url
,webpage/file_url
) must be publicly accessible over the internet for PdfCrowd's servers to be able to fetch them. - Handle Large Files: Document conversion, especially for large or complex files, can take time. Design your agent workflows to account for potential delays.
- Error Handling: Check the
Headers
output for HTTP status codes. A200 OK
indicates success, while codes like400
or500
indicate an error. TheResponse
body will often contain a detailed error message.
Troubleshooting Common Issues
-
Error:
401 Unauthorized
- Cause: The Base64 encoded credentials are incorrect, or your PdfCrowd account has an issue (e.g., out of credits).
- Solution: Carefully re-create and re-encode your
username:api_key
string. Log in to your PdfCrowd account to check your status and credit balance.
-
Error:
400 Bad Request
- Cause: The input
file_url
is invalid, inaccessible, or points to an unsupported file type. - Solution: Verify that the URL is correct and publicly accessible. You can test this by trying to open the URL in an incognito browser window. Ensure the file format is supported by the specific conversion component.
- Cause: The input
-
Conversion Fails or Times Out
- Cause: The source file may be extremely large, complex, or corrupted. There could also be a temporary issue with the PdfCrowd service.
- Solution: Try converting a smaller, simpler file to confirm your setup is correct. Check the PdfCrowd status page for any reported outages.
What's Next?
You are now ready to build powerful document processing pipelines with the SmythOS PdfCrowd Integration!
Consider these ideas:
-
Build an Agent That...
- Acts as a "Webpage Archiver." It takes a URL from a user, uses the
HTML to PDF
component to create a PDF snapshot, and then saves the file to OneDrive. - Creates a "Report Summarizer." The agent receives a PDF report, uses
PDF to Text
to extract the content, and then feeds the text to an LLM component to generate a concise summary. - Manages receipts. An agent takes user-submitted photos of receipts, uses the
Image to PDF
component to standardize them, and then stores them for expense reporting.
- Acts as a "Webpage Archiver." It takes a URL from a user, uses the
-
Explore Other Integrations:
- Combine PdfCrowd with a web scraping tool. Scrape data from multiple pages, have your agent format it into a single HTML report, and then use
HTML to PDF
to create a final document. - After converting a document, use the SendGrid Integration to email the generated PDF or text file as an attachment.
- Combine PdfCrowd with a web scraping tool. Scrape data from multiple pages, have your agent format it into a single HTML report, and then use