Chromium on FreeBSD / creating PDF from Django template

Hello guys,

I am using django-hardcopy to create PDF from django template.

Aplication was on heroku and i had to specifiy PATH_TO_CHROME. Everything was working on heroku with:
PATH_TO_CHROME='/app/.apt/opt/google/chrome/chrome --headless --print-to-pdf --disable-gpu --no-sandbox'

I had to transfer app on freeBSD on mydevi.net and the problem started.
From support i recieved info how to download chromium (pkg install or other commands requiring root privileges are not allowed):

wget https://pkg.freebsd.org/FreeBSD:13:amd64/release_1/All/chromium-100.0.4896.60_1.pkg tar -zxf chromium-100.0.4896.60_1.pkg export LD_LIBRARY_PATH=~/usr/lib/ export LD_LIBRARY_PATH=~/usr/local/lib/ wget https://pkg.freebsd.org/FreeBSD:13:amd64/release_1/All/openh264-2.2.0,2.pkg tar -zxf openh264-2.2.0,2.pkg cd ~/usr/local/bin/ ./chromedriver --help

I did that above, and now i have in ~/usr/local/bin/ two file chrome and chromedriver.
I am trying to pass in django settings
Code:
CHROME_PATH='~/usr/local/bin/' or '~/usr/local/lib/chrome'

but it doesn't work...

The application behaves as if this chromium environment is not starting, as it could not find chrome.exe
On development on localserver i points to the path to chorme in program files and everything works

I will add that I am a beginner when it comes to programming, so please be understanding...
 
Ok i made a progress:

Code:
[Klewiu@s26]:<~/usr/local/bin>$ ./chromedriver
Starting ChromeDriver 100.0.4896.60 (6a5d10861ce8de5fce22564658033b43cb7de047-refs/branch-heads/4896@{#875}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1662360055.820][SEVERE]: bind() failed: Operation not permitted (1)
[1662360055.820][SEVERE]: bind() failed: Operation not permitted (1)
Unable to start server with either IPv4 or IPv6. Exiting...

but still it doesn't work...
 
Back
Top