PDF invoices broken
-
@girish @nebulon Hi, sorry about replying to solved issue but I am getting this weirdly. The PDF does generate but when I go to download/print/view it I get this:
Same issue it seems.
Tried adding these to the env file. Even tried different combos of these.
Not proxied through cloudflare this time.PHANTOMJS_PDF_GENERATION=false PDF_GENERATOR=hosted_ninja
No change after at all. It is a fresh install from today as I'm messing with it for testing purposes.
Have tried edge,chrome,firefox and no change at all in either. Even tried their windows app with no avail.
The fixes and main issues aren't really descriptive enough for a fix.Any advice or tips on this?
-
@joesitsolutions do you see any errors in the app logs or the browser console when you try to download it?
-
@joesitsolutions my instance is working fine but my env file looks like this now, with no mention of the "PDF_GENERATOR=hosted_ninja" line.
NINJA_ENVIRONMENT=selfhost PHANTOMJS_PDF_GENERATION=false COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}' DISABLE_AUTO_UPDATE=true
-
@joesitsolutions said in PDF invoices broken:
PDF_GENERATOR=hosted_ninja
I think we use snappdf. So, this variable should probably read
PDF_GENERATOR=snappdf
-
Hi All,
Thanks for the reply around this.
Here is the browser console
There are some errors/warnings there
Not entirely sure what this means...
Ain't too familiar with Chrome errors.
Here is a log from when I load this page. https://pastebin.com/JhNaA1v2
Trying some more fixes suggested.
@girish said in PDF invoices broken:PDF_GENERATOR=snappdf
Tried this and PDFs do not generate. Not even in the preview.
Should this be on a new line or is it fine right bellow something?
I did save the env file and restart the app upon each change.I also gave this a shot with no change.
@humptydumpty said in PDF invoices broken:
NINJA_ENVIRONMENT=selfhost
PHANTOMJS_PDF_GENERATION=false
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
DISABLE_AUTO_UPDATE=true -
@joesitsolutions said in PDF invoices broken:
No change after at all. It is a fresh install from today as I'm messing with it for testing purposes.
I didn't see this before. Let me test with a fresh install. So, I just create an invoice and the PDF generation fails?
-
@girish Yep, Previews work but actually making a PDF and downloading it or Viewing a PDF within the platform produces a grey file. I'm not sure if it is just a "me" issue so if you'd like to test it'd be interesting to see if it is more widespread perhaps.
-
@joesitsolutions A vanilla invoiceninja works for me both in Chrome and Firefox.
I also have the following like @humptydumpty
NINJA_ENVIRONMENT=selfhost PHANTOMJS_PDF_GENERATION=false COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
-
@girish Yep works fine in the demo site.
This is a strange one and very likely a me issue. Even if I put my config back to normal it doesn't work for me... then I clear my pfsense's suricata blocks and it loads.
Hmm, I wonder if this pulls in external formatting/css/styles from somewhere that is being blocked on my end or something weird like that.
But then why would the preview load fine. Real head scratcher this one.Edit:
I've tried from my phone and am getting the same issue. Even with IDS/IPS/PFblocker off on my FW.
The preview itself loads fine with normal Vanilla config but when I go to preview PDF or download I get the gray file.
Still not sure what is happening tbh. Worth a reinstall perhaps?Edit 2:
Did a reinstall and it works...? Am I the problem rolf..
Thanks for your help. I'll do some more testing and see if I run into this issue again.