Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install wkhtmltopdf with patched QT on Ubuntu Linux
# Uncomment the next line if you have installed wkhtmltopdf
# sudo apt remove wkhtmltopdf
cd ~
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox*.tar.xz
sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig
@faniska

This comment has been minimized.

Copy link
Owner Author

@faniska faniska commented Nov 15, 2017

This instruction will help if you have error code -6 of wkhtmltopdf when you try to print.
It worsk for Odoo 10 on Ubuntu Linux 16.04.3

@Nahuelito

This comment has been minimized.

Copy link

@Nahuelito Nahuelito commented Mar 5, 2018

It worked perfectly for me on Odoo 11 under Ubuntu Xenial as well. Thanks for you contribution!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Mar 6, 2018

why to install the devel libs?

btw. Thanks for sharing, works for me (without openssl, build-essential etc.)

@vincentvandijk

This comment has been minimized.

Copy link

@vincentvandijk vincentvandijk commented Mar 9, 2018

Nice one!

@adFedorovich

This comment has been minimized.

Copy link

@adFedorovich adFedorovich commented Mar 12, 2018

thanks )

@lipsleep

This comment has been minimized.

Copy link

@lipsleep lipsleep commented Apr 11, 2018

Thank you very much.

@solucionatico

This comment has been minimized.

Copy link

@solucionatico solucionatico commented Apr 11, 2018

Great, thanks man.

@pvin

This comment has been minimized.

Copy link

@pvin pvin commented Apr 23, 2018

Thanks @faniska. It worked.

@marceloalejoc

This comment has been minimized.

Copy link

@marceloalejoc marceloalejoc commented May 23, 2018

Yes! Thanks.

@i-Tor

This comment has been minimized.

Copy link

@i-Tor i-Tor commented Jun 9, 2018

Thank you! This set me up in the right direction. After much investigation, only wkhtml2pdf version that worked was 12.1.

@odoobandung

This comment has been minimized.

Copy link

@odoobandung odoobandung commented Jul 28, 2018

yes

@carlosmaguda

This comment has been minimized.

Copy link

@carlosmaguda carlosmaguda commented Sep 17, 2018

thank you worked for me as well

@vladnfr

This comment has been minimized.

Copy link

@vladnfr vladnfr commented Oct 25, 2018

Saved my evening!

@AthmanZiri

This comment has been minimized.

Copy link

@AthmanZiri AthmanZiri commented Nov 12, 2018

I'm running odoo11 and this worked for me! Thanks

@pii-dee

This comment has been minimized.

Copy link

@pii-dee pii-dee commented Feb 14, 2019

It's not working, I am using odoo 12 still getting error: Wkhtmltopdf failed (error code: -8). Message: b''

@thkfighter

This comment has been minimized.

Copy link

@thkfighter thkfighter commented Mar 10, 2019

It's not working, I am using odoo 12 still getting error: Wkhtmltopdf failed (error code: -8). Message: b''

I've found the solution from the odoo forum:

install the ttf-mscorefonts-installer package and clear your font cache:
sudo apt install ttf-mscorefonts-installer
sudo fc-cache -f -v
by Mitul Shingala

@syeduzairshah

This comment has been minimized.

Copy link

@syeduzairshah syeduzairshah commented Apr 24, 2019

@faniska worked like a charm, thanks for sharing

@nevthanhps

This comment has been minimized.

Copy link

@nevthanhps nevthanhps commented May 17, 2019

Thank you! It's work well with Odoo 12 Community on Debian 9

@rvcsdev

This comment has been minimized.

Copy link

@rvcsdev rvcsdev commented May 17, 2019

It worked! Thank you! You saved me there! :D

@gildaskotako

This comment has been minimized.

Copy link

@gildaskotako gildaskotako commented May 29, 2019

Thank you! It's work well with Odoo 12

@beddiescole

This comment has been minimized.

Copy link

@beddiescole beddiescole commented Jun 4, 2019

Neato! Nifty, man. Thanks, dawg.

@Tahirhan

This comment has been minimized.

Copy link

@Tahirhan Tahirhan commented Jul 2, 2019

Thanks!

@a8568730

This comment has been minimized.

Copy link

@a8568730 a8568730 commented Jul 30, 2019

Thank you! You saved my day! It works with Mint 18.3 Cinnamon 64-bit 3.6.7.

To those who get the error "wkhtmltopdf throws "QSslSocket: cannot resolve CRYPTO_num_locks" when using a template", I follow the advise and it works.

sudo apt-get install libssl1.0-dev
@jpsneto

This comment has been minimized.

Copy link

@jpsneto jpsneto commented Jul 30, 2019

Thanks!!
Solved the problem:
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support

@sonoalex

This comment has been minimized.

Copy link

@sonoalex sonoalex commented Jan 18, 2020

thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.