Closed HeyWatchOutDude closed 2 days ago
Phantom would require your instance be publicly assessible. There is no need to use Phantom with the default dockerfile as it comes prebuilt with Snappdf which generates the PDF locally.
How can I set it to "snappdf"?
are you using our standard docker-compose file? it should work out of the box.
No, I'm not using docker.
I have used the following guide:
https://www.linuxbabe.com/ubuntu/install-invoiceninja-ubuntu-20-04-apache-nginx/amp
Hi,
im unable to generate PDF files via phantomjs - local.
.env configuration: (related to phantomjs - local)
PHANTOMJS_PDF_GENERATOR=TRUE
PDF_GENERATOR=phantom
PHANTOMJS_SECRET=<KEY>
PHANTOMJS_BIN_PATH=/usr/bin/phantomjs
phantomjs version: 2.1.1
invoiceninja version: 4.5.49
OS: Ubuntu 20.04.4 LTS
php version: 7.3
Command: phantomjs test.pjs Output:
\n{ "errorCode": 408, "errorString": "Network timeout on resource.", "headers": [ { "name": "Accept", "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, { "name": "User-Agent", "value": "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1" } ], "id": 1, "method": "GET", "time": "2022-04-22T19:42:39.241Z", "url": "https://hostname.example.com/view/mlxbfqgbtelztwntrvwc0fcxk3ulxsqb?phantomjs=true&phantomjs_secret=SECRET", "status": 408, "console": [] }
InvoiceNinja Logs:
[2022-04-22T19:35:55.466938+00:00] production.ERROR: PhantomJS - Invalid response https://hostname.example.com/view/mlxbfqgbtelztwntrvwc0fcxk3ulxsqb?phantomjs=true&phantomjs_secret=SECRET: {"context":"PHP","user_id":1,"account_id":1,"user_name":"Firstname lastname","method":"GET","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36","locale":"de","ip":"192.168.20.200","count":1,"is_console":"no","is_api":"no","db_server":"mysql","url":"test_headless"} []