Hello,
We are running a self hosted invoice ninja docker (Unraid OS) currently running from the web browser. Recently (within the last 3 or 4 days) it has started to take a long time to generate PDFs to print for the customer. It was never instant - But I do not recall it taking this long. It is taking about 10 - 12 seconds to bring up the print screen preview. Also when I scroll down to the bottom of the page to “preview” the PDF it takes at least 10 seconds to load the preview as well.
Does anybody have any thoughts? Where should I start?
(Please note I am newer to servers, Dockers and all of this. Having a lot of fun working on it and learning it. We are now using Invoice Ninja as our primary software at work and everybody seems to love it. Hoping we can find a way to make the PDFs load a little faster.)
Thanks guys!
What are you using for PDF generation? It could depend on that and it could also depend on how much memory you have allocated to your VM.
Thanks for the reply.
I was browsing the forum and I found another post about editing the ENV file and entering different options for PDF Generation.
My question is how do I edit this file? I was able to locate it but it only has 1 line when i open it with notepadd++. App_key=Base (then a key) is the only line in the ENV file.
What direction do I go from here?
Thank you!
Generally, I use Nano, the default editor on most Linux CLI. I know lots of people also like to use Vim or NeoVim.
There should be a lot more information in the .env
file than just that. Following is the sample provided by the developers.
APP_NAME="Invoice Ninja"
APP_ENV=production
APP_KEY=base64:RR++yx2rJ9kdxbdh3+AmbHLDQu+Q76i++co9Y8ybbno=
APP_DEBUG=false
APP_URL=http://localhost
REACT_URL=http://localhost:3001
DB_CONNECTION=mysql
MULTI_DB_ENABLED=false
DB_HOST=localhost
DB_DATABASE=ninja
DB_USERNAME=ninja
DB_PASSWORD=ninja
DB_PORT=3306
DEMO_MODE=false
BROADCAST_DRIVER=log
LOG_CHANNEL=stack
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
POSTMARK_API_TOKEN=
REQUIRE_HTTPS=false
GOOGLE_MAPS_API_KEY=
ERROR_EMAIL=
TRUSTED_PROXIES=
NINJA_ENVIRONMENT=selfhost
#options - snappdf / phantom / hosted_ninja
PDF_GENERATOR=hosted_ninja
PHANTOMJS_KEY='a-demo-key-with-low-quota-per-ip-address'
PHANTOMJS_SECRET=secret
UPDATE_SECRET=secret
DELETE_PDF_DAYS=60
DELETE_BACKUP_DAYS=60
COMPOSER_AUTH='{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}'
GOOGLE_PLAY_PACKAGE_NAME=
APPSTORE_PASSWORD=
MICROSOFT_CLIENT_ID=
MICROSOFT_CLIENT_SECRET=
MICROSOFT_REDIRECT_URI=
APPLE_CLIENT_ID=
APPLE_CLIENT_SECRET=
APPLE_REDIRECT_URI=
NORDIGEN_SECRET_ID=
NORDIGEN_SECRET_KEY=
OPENEXCHANGE_APP_ID=