The PDFCrowd Postman collection contains requests for converting webpage
URLs, HTML strings and HTML files to PDF. Use it to test conversion parameters
and inspect API responses before integrating the API into your application.
Set up the collection
Fork or import the PDFCrowd collection in Postman.
Set the username and api_key environment variables
to your PDFCrowd credentials.
Choose a preconfigured request for a publicly accessible webpage URL,
an HTML string or an HTML file.
Configure parameters such as page size, margins, headers and footers.
Send the request, inspect the response and download the generated PDF.
The following examples demonstrate how to use the PDFCrowd Postman collection
to convert HTML to PDF.
The collection includes demo values for both username
and api_key, so you can run the examples without a PDFCrowd account.
To use your personal credentials, set these variables to your
PDFCrowd username and API key.
Example 1: Convert a URL to PDF
Convert a public webpage URL to PDF. Replace the example URL with a page on
your website that PDFCrowd can access.
Request Configuration
Method:
POST
Endpoint:
Export URL to PDF
Body (form-data):
url: https://your-site.example/invoice/123
The response contains the PDF file data. In Postman, click "Save Response"
to download the generated PDF.
Example 2: Convert HTML String to PDF
Convert HTML content directly - useful when generating PDFs from templates
or dynamic content.
Use Postman's pre-request scripts to dynamically generate HTML content
from variables or external data sources.
Example 3: Upload and Convert HTML File
Upload an HTML file for conversion - useful for batch processing
or converting existing documents.
Request Configuration
Method:
POST
Endpoint:
Export File to PDF
Body (form-data):
file: Select file (type: File)
Choose your HTML file
Example 4: Check Account Status
Verify your credentials and check your remaining API credits.
Request Configuration
Method:
GET
Endpoint:
Get Account Info
The response includes your account status and remaining credits.
Authentication
Setting Up Your PDFCrowd Credentials
The PDFCrowd Postman collection uses
Basic authentication
with the username and api_key variables. These are
defined in the collection and can be overridden by an active environment.
Credential Variables
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.
Using an Environment (Optional)
The supplied environment template leaves both credential values blank.
Set them to your personal credentials or demo before selecting
the environment.
In Postman, click on "Environments" in the left sidebar
Create a new environment or select an existing one
Add two variables:
username - set to your PDFCrowd username
api_key - set to your PDFCrowd API key
Select the environment from the dropdown in the top-right corner
API Endpoint
The collection uses https://api.pdfcrowd.com as the base URL
with API version 24.04.
Security Notes
Store your API key in Postman's "Current Value" field (not synced to cloud) for security.
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 API returns an HTTP error status code along with
a message explaining what went wrong.
Common Errors
401 Unauthorized
Invalid username or API key. Verify your credentials in the Postman
environment variables. 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, or file parameter.
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.
Check the response body: Error responses include detailed
messages explaining the issue.
Verify authentication: Use the "Get Account Info" endpoint
to confirm your credentials are working.
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.
Using Postman Tests for Error Handling
You can add tests in Postman to automatically check for errors:
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response is PDF", function () {
pm.response.to.have.header("Content-Type", "application/pdf");
});
Troubleshooting
Common issues and solutions when using PDFCrowd with Postman.
Connection Issues
Verify you're using your API key, not your account password
Check that environment variables are set correctly (username and API key)
Ensure the environment is selected in Postman before sending requests
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)