wkhtmltopdf

unable to install wkhtmltopdf with patched qt in ubuntu 16.04

橙三吉。 提交于 2019-12-04 13:20:07
问题 wkhtmltopdf with patched qt pkg is not available for ubuntu 16.04 .so i am install 14.04 pkg which is install without patched qt but it need it with patched qt. I also tried with static version but it give some compilation error 回答1: The patched version of wkhtmltopdf is not present in the Ubuntu repository. You can download it from the project website if you want. But they still don't have a .deb file for Xenial Xerus, so you need to download the binary file and install the dependencies (

Error running wkhtmltopdf — (error while loading shared libraries)

强颜欢笑 提交于 2019-12-04 08:47:51
问题 When my app runs (or when I run from commandline) the wkhtmltopdf command I get the following error: (showing it from command line) #> wkhtmltopdf wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory I noticed the lib is indeed in the /usr/lib folder but not the /lib folder. Does it matter which one of these it is in? Is there any way to get it to recognize it? #> ls -l /usr/lib/libXrender.so* lrwxrwxrwx 1 root root 19

HTML to PDF with Wicked PDF and letter-spacing issues

China☆狼群 提交于 2019-12-04 07:48:12
Using both 0.79 and 0.7.2 the PDF generated looks slightly different than my original HTML. Adding the show_as_html flag presents it as expected however the inline-styles are being handled differently in the PDF then they are in the HTML preview. Specifically the problem I'm having is with letter-spacing declarations which also have a float not being rendered correctly. So for instance on a right float element which has the letter-spacing, the PDF will space the characters too much and from center such that the text goes partially off the screen rather than bumping further to left for the

Using Wkhtmltopdf with Nodejs on Heroku

蓝咒 提交于 2019-12-04 06:29:43
问题 Here is the thing. I'm on nodejs and I want to generate a PDF file with wkhtmltopdf. It works fine locally, but when I push it on heroku I have an "Application Error". I think it's because it's missing a binary Wkhtmltopdf for Heroku, do you know one? Or is it something else? 回答1: Heroku doesn't include the wkhtmltopdf binary, but you have two options to get it working there. First is to build wkhtmltopdf from source on Heroku (using the Vulcan gem). The second is to directly bundle

How to print pdf in debian linux from MVC controller

只谈情不闲聊 提交于 2019-12-04 06:22:43
问题 AsP.NET MVC 4 application runs in Debian Squeeze Linux using Mono. Controller creates pdf file from html using code below. How to print pdf file to Samsung printer connected to server ? It there some executable which can used for this ? public class Test: Controller { public ActionResult Print() { PrintOrderVormiga(); return new ContentResult() { Content = "OK" }; } void PrintOrderVormiga() { StringBuilder sb = new StringBuilder(); sb.Insert(0, " test ", 500); pdf = ConvertHtmlToPDF("<html>

How to make wkhtmltopdf work in Odoo v10 on Debian 9 “Stretch”?

半世苍凉 提交于 2019-12-04 05:01:18
问题 I know from the Odoo website that Odoo needs an special wkhtmltopdf version: Danger to print PDF reports, you must install wkhtmltopdf yourself: the version of wkhtmltopdf available in debian repositories does not support headers and footers so it can not be installed automatically. The recommended version is 0.12.1 and is available on the wkhtmltopdf download page, in the archive section. As there is no official release for Debian Jessie , you can find ours on the extra section of our

Is there any wkhtmltopdf option to convert html text rather than file?

为君一笑 提交于 2019-12-04 02:06:27
I recently stumbled on wkhtmltopdf and have found it to be an excellent tool for on-the-fly conversion from html to pdf in the browser. A typical usage (in Windows) would go: wkhtmltopdf.exe --some-option "<div>Some html <b>formatted</b> text</div>" www.host.com/page_to_print.html file.pdf My question is: Is there an option to use <html><head></head><body><h1>This is a header</h1></body></html> in place of www.host.com/page_to_print.html ? Thanks for any help. Yes and no. There is no native support, but you can pipe content into wkhtmltopdf using the windows command prompt pipe. Try this

Execute wkhtmltopdf from PHP

余生颓废 提交于 2019-12-04 01:52:12
I have this working fine from Linux command line: wkhtmltopdf entry.html output.pdf But the following doesn't work from PHP code: exec ('wkhtmltopdf entry.html output.pdf'); Interesting, I've googled and a lot of non-checked solutions and with no explanation why this is a problem. Thanks if you have the good ones. wkhtmltopdf has bindings , one of them is for PHP. You could give those a shot. Andrei Sandulescu had the same problem and i don't think anyone else should waste > 3 hours: the solution is here: wkhtmltopdf error in apache log you just have to install xvfp "to emulate a x-environment

How to use wkhtmltopdf in Java web application?

半腔热情 提交于 2019-12-04 01:48:27
I am newbie in wkhtmltopdf . I am wondering how to use wkhtmltopdf with my Dynamic Web Project in Eclipse? How to integrate wkhtmltopdf with my Java dynamic web application? Is there any tutorials available for beginners of wkhtmltopdf ? (Basically, I would like to use wkhtmltopdf in my web application so that when user click a save button , the current page will be saved to PDF file). First, a technical note: Because you want to use wkhtmltopdf in a web project, if and when you deploy to a Linux server machine that you access via ssh (i.e. over the network), you will need to either use the

wkhtmltoimage开源工具的基本应用

*爱你&永不变心* 提交于 2019-12-04 01:20:19
读大学时,微博兴起,由于140个字有限,于是有人开发了长微博,当时但想着开发一个长微博的应用。试用了几款长微博工具,大部分都是只能输入文字和插件一两张图片,这种长微博工具实现不难。但如果想在长微博中支持富文本,例如插件表格之类的( http://www.changweibo.com/ ),那就没那么简单了。 实现支持富文本的长微博,原理如下: 1.客户端提供一个富文本输入框(CKeditor,Ueditor之类的) 2.把在输入框中输入的html代码发送到服务端,服务端解析html代码,生成图片返回客户端 重点要解决的问题是后台如何解析html代码并生成图片。一个最初的想法是用htmlparse解析html代码,对于简单的html代码这个方法可行,但如果html代码的结构混乱就麻烦了。另一个想法是在后台用一个浏览器渲染这段html代码,然后利用浏览器的功能把图片导出。基于这个想法,用了javafx2.0里面的Webview,Webview实质上就是一个浏览器,它用的是WebKit内核,用它可以渲染html和执行javascript。用Webview生成图片的代码如下: import java.io.File; import java.io.IOException; import javafx.application.Application; import javafx.beans