Fix "File is Empty" or "File could not be opened"
If you see one of these error messages when calling PDF4me—from the API, Power Automate, Zapier, Make, or n8n—it usually means the file we received is either empty, corrupted, or in a format we can't process.
Error Messages You Might See
Quick Resolution Checklist
- Verify the file – Opens locally, not 0 bytes
- Check Base64 – Not truncated, correctly encoded (Power Automate, Zapier, Make, n8n)
- Confirm upstream steps – All flow steps before PDF4me succeeded
- Use correct file type – PDF for ExtractTextByExpression, SplitPdfByBarcode; convert images first if needed
Resolution Steps
- Open the file locally and confirm it opens without errors
- Check the file size—it should not be 0 bytes
- If it's a PDF, try opening it in a standard PDF viewer
- Ensure the Base64 encoding step runs correctly and isn't truncated
- If using dynamic content, confirm the content is not empty
- Test with a known-good file to isolate the issue
- In Power Automate, review the run history
- In Zapier, check that the trigger and preceding steps returned expected output
- If an earlier step fails or returns null, the file passed to PDF4me may be empty
- ExtractTextByExpression, SplitPdfByBarcode, Parse Document: send PDF only
- ImageStamp: main document is typically PDF; stamp image can be an image format
- When in doubt, convert to PDF first with Convert to PDF
Platform-Specific Tips
When using Zapier, if you see "File is Empty" or "File could not be opened", check whether "File: (Exists but not shown)" is selected. Zapier may pass a reference instead of the actual file content. Switch to the option that provides the full file (e.g. actual file content or Base64), not the "Exists but not shown" placeholder.
PDF4me actions usually accept Base64-encoded file content. Make sure the expression or dynamic content returns the full Base64 string, you're not passing a file path or URL where Base64 is expected, and the "File Content" field receives the output of a proper Base64 conversion step.
The same principles apply: use full file content or Base64, ensure upstream modules completed successfully, and use PDF for actions that require PDF input.