pdfkit does not style pdfs

前端 未结 6 1378
庸人自扰
庸人自扰 2020-12-14 02:22

I have a rails 3.1 app that creates pdf documents using pdfkit, and everything works as specified, except for the fact that the generated pdfs don\'t have any styling. I am

6条回答
  •  难免孤独
    2020-12-14 03:03

    For me it was problem with installation for ubuntu. I just reinstalled from source:

    # first, installing dependencies
    sudo aptitude install openssl build-essential xorg libssl-dev
    
    # for 64bits OS
    wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2 
    tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
    mv wkhtmltopdf-amd64 /usr/local/bin/wkhtmltopdf
    chmod +x /usr/local/bin/wkhtmltopdf
    
    # for 32bits OS
    wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2 
    tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
    mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf
    chmod +x /usr/local/bin/wkhtmltopdf
    

    And everything works now for me. So my advice is do not install wkhtmltopdf by this command sudo apt-get install wkhtmltopdf and install it from sources. Full instructions for installation process

提交回复
热议问题