Hi everyone,
we are experiencing an issue with the HTML2PDF (O11) component in an OutSystems 11 environment.
Context:
- We are using HTML2PDF as a Service
- It is called from Reactive Web applications
- We use GeneratePDF_Advanced with:
- URL = "about:blank"
- HTML = MyHTML (string)
Problem:
- In Development environment, the generated PDFs are always EMPTY
- The PDF file is created and downloaded, but it contains no content
- The same implementation works correctly in Test and in Prod environment
Important test performed:
To isolate the issue, we replaced our dynamic HTML with a minimal static HTML:
PDF TEST
Result:
- In Development → PDF is still EMPTY
This confirms that the issue is NOT related to the HTML content.
Additional observations:
- No visible errors in UI
- wkhtmltopdf seems to execute (based on logs)
- The issue started suddenly without code changes
- It affects multiple applications using the same service
Suspected causes:
- Environment-specific issue (Development only)
- wkhtmltopdf execution context
- Permissions on TEMP folder
- Security / antivirus restrictions
- Blocked execution of binaries
Questions:
- Has anyone experienced empty PDFs even with static HTML?
- Could this be related to environment restrictions or permissions?
- Any known issues with HTML2PDF + wkhtmltopdf in Development environments?
Any help or similar experience would be highly appreciated.
Thanks in advance!
1. 🚫 Execution Permissions / Security Blocking (Top Cause)
Even if wkhtmltopdf.exe runs, security tools may block:
Check:
👉 This is the #1 real-world cause of “empty PDF”
2. 📁 TEMP Folder Access Issue
wkhtmltopdf uses temp files internally.
If Dev environment:
👉 Result = empty output
Verify:
3. 🔤 Fonts Missing or Blocked
If fonts are unavailable:
Access to:
C:\Windows\Fonts
4. ⚙️ wkhtmltopdf Binary Issue
Even if it "runs", it might be:
👉 Common after:
5. 🔒 Execution Policy / Sandbox Restrictions
Dev environments often have stricter policies:
6. 🧪 Service Account Differences
Check what account runs OutSystems services:
👉 That account might lack:
Hey @Binod Comini ,Although I am not sure but I can assume this problem comes because of the company protected laptop. Have you checked this in your personal environment? I mean personal env inside company laptop and then if the issue, persists then we can assume this problem comes from company protected laptop.
Thanks,
Sudip
Hi @Binod Comini,
Since the issue also happens with a minimal static HTML, this strongly suggests the problem is environmental rather than related to the HTML itself.
A few additional things you could verify in the Development environment:
1. Test wkhtmltopdf execution directly on the server
Try executing wkhtmltopdf.exe manually from the Dev server using a very simple HTML file.
If the generated PDF is still blank outside OutSystems, then the problem is definitely at OS/security level rather than the application.
2. Check recent Windows or security updates
We experienced similar behavior once after:
Windows security updates
Endpoint protection policy updates
Antivirus signature updates
Even without code changes, these can silently affect wkhtmltopdf rendering.
3. Verify GDI / font rendering permissions
wkhtmltopdf depends heavily on Windows font rendering.
A useful test:
Try generating PDF with plain inline text using default fonts only
Avoid custom CSS/fonts temporarily
Sometimes missing access to:
GDI rendering components can produce completely blank PDFs instead of errors.
4. Validate TEMP file generation during runtime
Since HTML2PDF creates intermediate files internally:
Monitor %TEMP%
Check if temporary HTML/PDF files are created and immediately deleted
Verify IIS/AppPool identity permissions
Especially compare:
Dev AppPool identity
Test/Prod AppPool identity
5. Enable verbose logging for wkhtmltopdf
If possible, try capturing stderr/stdout from the process execution.
In many cases wkhtmltopdf actually outputs warnings like:
blocked local file access
rendering failure
font initialization errors
sandbox restrictions
but the component itself only returns an empty PDF.
6. Compare wkhtmltopdf binary versions
Even if the Forge asset is identical, the actual binary on Dev may differ or become corrupted.
Worth checking:
file hash
execution manually from CMD
reinstalling the binary/service component
The fact that:
Test works
Prod works
multiple apps fail only in Dev
static HTML also fails
makes this look highly likely to be:
permission/security related
temp folder restriction
corrupted wkhtmltopdf runtime
or OS-level rendering restriction.
Hope this helps — curious to know what the root cause turns out to be.