Skip to content

Instantly share code, notes, and snippets.

@iBet7o
Last active September 23, 2016 07:44
Show Gist options
  • Save iBet7o/f507ea371cddc37d26d6 to your computer and use it in GitHub Desktop.
Save iBet7o/f507ea371cddc37d26d6 to your computer and use it in GitHub Desktop.
Instalar wkhtmltopdf en CentOS

Instalación

Descargar e instalar el programa:

# wget http://iweb.dl.sourceforge.net/project/wkhtmltopdf/0.12.1/wkhtmltox-0.12.1_linux-centos6-amd64.rpm

# rpm -ivh wkhtmltox-0.12.1_linux-centos6-amd64.rpm

Instalar las dependencias:

yum install fontconfig libXrender libXext '*fonts*' openssl

Forma de uso

  • Convertir google a pdf:
wkhtmltopdf http://google.com google.pdf
  • Convertir google a pdf con orientación horizontal:
wkhtmltopdf -O 'Landscape' http://google.com google.pdf

Referencias

Instalación

Instalar las dependencias:

yum install fontconfig libXrender libXext '*fonts*' openssl

Descargar e instalar el programa:

# wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
# tar vxf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
# rsync -vlr wkhtmltox/* /usr/local/
# ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
# ln -s /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage

Forma de uso

  • Convertir google a pdf:
wkhtmltopdf http://google.com google.pdf
  • Convertir google a pdf con orientación horizontal:
wkhtmltopdf -O 'Landscape' http://google.com google.pdf

Referencias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment