Comments (7)
I'm going to try and I'll let you know. thanks!
Yes I install wkhtmltopdf by using apt-get install wkhtmltopdf
from imgkit.
Yes I install wkhtmltopdf by using apt-get install wkhtmltopdf
I am not sure if you install the package for raspbian pi platform, there are multiple packages in one release. https://github.com/wkhtmltopdf/wkhtmltopdf/releases/tag/0.12.5
from imgkit.
hi again! I think I've found the solution after all and you led me to this, so thank you so much!
You were right, it was coming from the wkhtmltopdf
that was installed when I first did (months ago) sudo apt-get install wkhtmltopdf
. Definitely a wrong move. I realised that when I did a wkhtmltopdf -V
after installing wkhtmltox_0.12.5-1.stretch_amd64.deb
: it was not using this new version.
I also found out about amd64 and i386: I didn't know Stretch could be rather 64bit or 32. In my case, using uname -m
it gave me back armv7l
which is... 32bit. The amd64 version that I downloaded was completely useless.
So I did sudo apt-get purge --auto-remove wkhtmltopdf
to get rid of the package and its dependencies and then went on the wkhtmltopdf release page to copy the link for the Debian 9 (Stretch) raspberrypi architecture.
I followed the instructions of your init.sh file, replacing https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
with the link I've just copied for Stretch.
When I did wkhtmltopdf -V
to see if I had the right version this time, it told me that it couldn't find any file or folder. With which wkhtmltopdf
I was able to see that I installed it in /usr/local/bin/
instead of /usr/bin/
so I moved the file back using mv /usr/local/bin/wkhtmltopdf /usr/bin
.
wkhtmltopdf -V
worked like a charm this time and returned wkhtmltopdf 0.12.6 (with patched qt)
.
Full of hope, I tried wkhtmltoimage inputfile outputfile
and had a new error: Warning: Blocked access to file
which was easily solved by doing wkhtmltoimage --enable-local-file-access inputfile outputfile
as explained here. Then, when I tried adding xvfb-run
just before this line, I had no error and my images were finally pictured! 🥳
I tried to do the same in my python code by doing:
options={
'enable-local-file-access': '',
'xvfb':""
}
imgkit.from_file(inputfile, outputfile, options=options)
And it also worked 😭 I can't believe it!
Thanks again for your support and I promised, I'll stop cursing xvfb next time haha
from imgkit.
@estherbouquet thanks for the question.
libEGL warning: DRI2: failed to create any config
libEGL warning: DRI2: failed to create any config
Looks this error is about the raspberry pi, can you try on another environment like an Ubuntu server?
from imgkit.
Unfortunately I would not know how to do it, my knowledge is limited, sorry.
from imgkit.
How about running wkhtmltoimage
directly and check the result? Did you install wkhtmltopdf
for raspberry pi platform?
from imgkit.
How about running
wkhtmltoimage
directly and check the result? Did you installwkhtmltopdf
for raspberry pi platform?
So I tried to run wkhtmltoimage
in my terminal and no problem, the pictures are here even though I have libEGL warning: DRI2: failed to authenticate
showing up. When I do xvfb-run wkhtlmtoimage
in my terminal, no picture are rendered though.
After trying that, I reinstalled the wkhtmltopdf
package for the stretch version (wkhtmltox_0.12.5-1.stretch_amd64.deb) instead of bionic as in your readme and no luck there neither. Still no picture and still the same error with libEGL and DRI2 anytime I use xvfb with imgkit or xvfb-run with wkhtmltoimage.
Do you think it's because I need to give a display number to xvfb somewhere in order for the raspberry to know which display screen to use to render the pictures?
from imgkit.
Related Issues (20)
- from_string() got an unexpected keyword argument 'config' HOT 1
- Encoding character bug in .from_string HOT 2
- UnicodeDecodeError on using "quiet" option HOT 4
- How to display the emojis from the html file? HOT 3
- How to load from a local image file? HOT 1
- Fail to support UTF-8 text (Chinese Characters)? HOT 4
- No wkhtmltoimage executable found error on google colab HOT 1
- Proposing a PR to fix a few small typos HOT 1
- Converting a html file to jpg freezes/does nothing HOT 1
- Image output is different than the html/css when rendered in browser
- Not significant difference in output image while using crop options HOT 1
- can execute bash command with imgkit.from_url and config
- utf-8' codec can't decode byte 0xff in position 0: invalid start byte HOT 1
- @font-palette-values CSS apparently not supported
- IMGKit.to_img crashes when setting mode to quiet and receiving the image in-memory
- OSError: wkhtmltoimage exited with non-zero code 1. error: Unknown long argument --no-background HOT 2
- How to set options for wkhtmltopdf in imgkit options? HOT 1
- I use python imgkit . sometimes i found html to image result is blank. HOT 4
- Delay before page screenshot
- Is still updated this proyect? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgkit.