wkhtmltopdf

wicked_pdf / wkhtml - support for css tables using tr.odd and tr.even to change background colour

≯℡__Kan透↙ 提交于 2019-12-24 00:55:35
问题 Does the wicked_pdf gem/plugin and the underlying wkhtmltopdf provide support for striping of alternating columns using css of tbody, tr.even and the corresponding tr.odd? I have this in my css file (in the public folder) but its not rendering the colours properly. table { width: 90%; border: 1px solid #999999; } th, td { padding: 7px 10px 10px 10px; } th { border-bottom: 2px solid #111111; border-top: 1px solid #999999; font-size: 90%; /* letter-spacing: 0.1em; */ text-align: left; text

WkHTMLtoPDF 0.12.2.1 PHP exec xvfb-run: Error: xauth command not found

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 22:42:58
问题 I want to generate a PDF from a URL, so I execute the command by WkHTMLtoPDF as below: /usr/bin/xvfb-run --server-args="-screen 0, 1920x1080x24" /usr/local/bin/wkhtmltopdf http://www.google.com /tmp/google.pdf 2>&1 The above command works fine on Terminal, But when I invoke the command inside PHP failed! And show me an error message as below: array(2) { [0]=> string(27) "which: no xauth in ((null))" [1]=> string(40) "xvfb-run: error: xauth command not found" } I don't know how to resolve this

Debian9 安装odoo12.0手记

前提是你 提交于 2019-12-23 18:08:08
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 使用通常的 apt 升级命令使您的安装保持最新。 apt-get update && apt-get upgrade -y 安装nodejs curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - apt-get install -y nodejs 一旦npm安装,使用它来安装less npm install -g less less-plugin-clean-css apt-get install node-less 安装wkhtmltopdf,要打印PDF报告,必须自己安装wkhtmltopdf:debian存储库中提供的wkhtmltopdf版本不支持页眉和页脚,因此无法自动安装。 推荐版本为0.12.1,可在wkhtmltopdf下载页面的归档部分中找到 wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.0.0_1.0.1t-1+deb8u9_amd64.deb dpkg -i libssl1.0.0_1.0.1t-1+deb8u9_amd64.deb wget http://ftp.cn.debian.org

How to run wkhtmltopdf securely on user-supplied HTML?

六月ゝ 毕业季﹏ 提交于 2019-12-23 17:03:14
问题 Is wkhtmltopdf secure enough to prevent abuse when run server-side on user-supplied HTML, and if so, which arguments would I need? I found how to disallow local file access, but I'd also like at least to prevent network access to localhost, and generally have it be about as secure as a modern browser. Is it? I don't actually intend to run wkhtmltopdf on user-supplied HTML, but on server-generated HTML. I'm concerned that the presence of wkhtmltopdf would make any HTML injection vulnerability

How to use wkhtmltopdf with Docker

☆樱花仙子☆ 提交于 2019-12-23 12:06:37
问题 When I use wkhtmltopdf (version 0.12.2.4, installed via apt-get) within a Docker container it fails with QXcbConnection: Could not connect to display (When I set the environment variable DISPLAY=unix0 , I get QXcbConnection: Could not connect to display unix0 which makes sense as no Xserver seems to be installed) There seems to be a headless version (source) and I thought that would mean that I don't need an Xserver. ( xvfb seems to be another option, but I'm not sure how to run it / what to

How to use wkhtmltopdf with Docker

社会主义新天地 提交于 2019-12-23 12:04:59
问题 When I use wkhtmltopdf (version 0.12.2.4, installed via apt-get) within a Docker container it fails with QXcbConnection: Could not connect to display (When I set the environment variable DISPLAY=unix0 , I get QXcbConnection: Could not connect to display unix0 which makes sense as no Xserver seems to be installed) There seems to be a headless version (source) and I thought that would mean that I don't need an Xserver. ( xvfb seems to be another option, but I'm not sure how to run it / what to

Add borders to each printed page with CSS?

送分小仙女□ 提交于 2019-12-23 09:34:25
问题 Is it possible in CSS or js to emulate the following format in printed media (eg showing borders for each page, with a page number and some text in the corner, with the content nicely split - and not chopped in half)? I have been using page-break-after to split the content up, but havn't found a way to add this kind of border/page number to each page. This only needs to work in WebKit. For further information, the reason I am doing this is I am printing HTML documents to PDF using wkhtml. 回答1

Python 3 flask install wkhtmltopdf on heroku

狂风中的少年 提交于 2019-12-23 09:14:05
问题 I have a problem to install the wkhtmltopdf binary on my heroku python app (flask). A year ago (python 2) I already had an issue, but I was able to solve it by first adding the wkhtmltopdf-pack to the requirements and installing it on heroku and then setting the config var to WKHTMLTOPDF_BINARY=wkhtmltopdf-pack . Here is my old thread Problem now: I am trying to use the same approach for python 3, but no version of the wkhtmltopdf-pack works, every push gets rejected and I cant install it. I

How to add headers and footers with django-wkhtmltopdf in my class based views with PDFTemplateResponse

我的梦境 提交于 2019-12-23 04:58:07
问题 I want to generate a pdf with headers, actually I'm working on cygwin andI don't know if something in my code is wrong or not, because I based my code in this examples Creating PDFs with django (wkhtmltopdf). This is my code: views.py from django.views.generic import View from wkhtmltopdf.views import PDFTemplateResponse GenerateReportPdf(View): def __init__(self): self.template = 'pdf_template.html' def get(self, request): ... response = PDFTemplateResponse( request=request, template=self