Unable to generate the raw PDF

Since the update, to the latest version: v5.10.24-W160 (with php 8.3.10) generating/showing a pdf doesn’t work anymore.

I use this setting in .env:
#options - snappdf / phantom / hosted_ninja
PDF_GENERATOR=hosted_ninja

This shows invoiceninja.log:
[2024-08-22 07:07:41] production.INFO: Client error: POST https://pdf.invoicing.co/api/ resulted in a 403 Forbidden response:

Getting the same error here

1 Like

And this is the laravel.log:
[2024-08-22 07:07:41] production.ERROR: Unable to generate the raw PDF {“userId”:1,“exception”:"[object] (App\Exceptions\FilePermissionsFailure(code: 0): Unable to generate the raw PDF at /home/jlitso/public_html/factuur/app/Jobs/Entity/CreateRawPdf.php:116)
[stacktrace]
#0 /home/jlitso/public_html/factuur/app/Http/Controllers/ClientPortal/InvitationController.php(200): App\Jobs\Entity\CreateRawPdf->handle()
#1 /home/jlitso/public_html/factuur/app/Http/Controllers/ClientPortal/InvitationController.php(173): App\Http\Controllers\ClientPortal\InvitationController->returnRawPdf()
#2 /home/jlitso/public_html/factuur/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\Http\Controllers\ClientPortal\InvitationController->routerForDownload()
#3 /home/jlitso/public_html/factuur/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\Routing\Controller->callAction()

Anyone any idea what’s wrong and what I can do to fix this?

Hi,

We’re looking into the problem

1 Like

This should be resolved now

Problem still exists:

[2024-08-22 07:33:18] production.INFO: The BIC field is not present and may be a required fields for EPC QR codes
[2024-08-22 07:33:18] production.INFO: The IBAN field is required
[2024-08-22 07:33:18] production.INFO: Client error: POST https://pdf.invoicing.co/api/ resulted in a 403 Forbidden response:

Yep still broken for me too…

Ok, we’re checking now…

We think we’ve tracked down the problem, please check again when you have a chance

It works again. Thank you. What was the problem? And is there anything else I can test etc.

Working for me now, many thanks

The problem was caused by a security rule in Cloudflare, if PDFs are loading the issue is resolved

1 Like

Have the same issue, using SnpaPDF instead, but cannt make it to work any longer, getting a 500 error.

Which rules in Cloudflare need to be set to let it work again?

Are there any details about the 500 error in storage/logs?

The change was made in our Cloudflare account, you don’t need to change anything.

Note: we’re fairly confident this problem was resolved, we had multiple confirmations.