wkhtmltopdf

wkhtmltopdf and leaflet wait for map

杀马特。学长 韩版系。学妹 提交于 2019-12-10 16:12:24
问题 I'm using wkhtmltopdf for print my html code, this code has leaflet maps, my problem is pdf file doesnt't print the map properly, it seems it doesn't wait for the map, so I included a window-status condition without success: In my html: var myMap = L.map('myMap',{attributionControl: false, zoomControl:false }) .on('load', function(){window.status = 'maploaded'}); My options for wkhtmltopdf: options = { 'dpi': 300, 'image-dpi': 400, 'zoom': 0.7, 'window-status': 'maploaded' } I check that the

How to run external executables from an Appharbor application (HTML to PDF generation)?

浪尽此生 提交于 2019-12-10 16:01:51
问题 I have a requirement to produce PDF's for one my .Net web applications currently hosted on Appharbor. Traditionally, I would simply install latex on the machine, and create PDF's on the fly with pdflatex. This requirement is to display sections in HTML to end users, but also have a downloadable PDF - so it's slightly different. I have found several (free) external HTML to PDF converters which may be applicable in this instance. However, I haven't found any libraries allowing me to do this

wkhtmltopdf generates a different checksum on every run

喜欢而已 提交于 2019-12-10 15:41:40
问题 I'm trying to verify that the content generated from wkhtmltopdf is the same from run to run, however every time I run wkhtmltopdf I get a different hash / checksum value against the same page. We are talking something real basic like using an html page of: <html> <body> <p> This is some text</p> </body </html> I get a different md5 or sha256 hash every time I run wkhtmltopdf using an amazing line of: ./wkhtmltopdf example.html ~/Documents/a.pdf And using a python hasher of: def shasum

Does wkHTMLtoPDF support @page rules?

爷,独闯天下 提交于 2019-12-10 14:13:05
问题 I've been trying to use this simple command to explore wkHTML2PDF abilities: wkhtml2pdf test.htm test.pdf It seems it doesn't support @page rules that might be included in an attached CSS file, or do I miss something? some parameters for examples? 回答1: The short answer is No. As @skobajic mentioned, there are command line parameters to get the same functionality. I don't see it coming any time soon given that webkit doesn't support it. https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2200

Session issue in wkhtmltopdf

眉间皱痕 提交于 2019-12-10 11:09:32
问题 Hi, I am converting HTML to pdf through wkhtmltopdf library, here session is behaving very differently that if we set the session when our link is called then it works fine but our previously set session is not getting? exec('C://"Program Files"//wkhtmltopdf.exe ' . 'http://localhost/test.php?a=351' . ' ' . $file_name . ''); Problem: Session set in test.php is available in this page when printing the page. But if we set the session in some previous page i.e test2.php then that value is null

How to Install wkhtmltopdf?

戏子无情 提交于 2019-12-10 10:52:10
问题 Now i am working on rails 3.0.0.i am using Ubuntu 11.10 ,64 bit os.i want to install wkhtmltopdf.please tell me the static version of wkhtmltopdf. 回答1: Installing wkhtmltopdf on Ubuntu Linux machine First check os is 32 bit or 64 bit by using following command Try uname -m . It seems like the uname -m actually gives x86_64 when it is an kernel 64 bits Run following command sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev Then run following command sudo apt-get

wkhtmltopdf - background color doesn't fill second page

ぐ巨炮叔叔 提交于 2019-12-10 10:45:13
问题 I am trying to convert an HTML to a PDF document with wkhtmltopdf. Command I am running is wkhtmltopdf ./test.html test.pdf Software version: wkhtmltopdf -V wkhtmltopdf 0.12.5 (with patched qt) The content is dynamic therefore I don't really know where it will end. Unfortunately when the content renders to the second page the background stops with the content. HTML below, any help would be fully appreciated and make an old developer happy after struggling so much :) <!DOCTYPE html PUBLIC "-/

Using wkhtmltopdf with highcharts shows blank chart

那年仲夏 提交于 2019-12-10 10:43:10
问题 I'm attempting to use wkhtmltopdf via Rotativa to convert a basic html page which uses jquery and highcharts to render a demo chart. The chart renders correctly when displayed in a browser. Can anyone tell me what I'm doing wrong? This code results in a blank PDF. My view: <!DOCTYPE html> <html> <head> <title>Highcharts Test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style type="text/css

Permission denied with wkhtmltopdf

拜拜、爱过 提交于 2019-12-10 10:12:38
问题 I have installed Wkhtmltopdf and I have this error when I execute him "/var/chroot/wkhtmltox-jessie-amd64: Permission denied". I search in Google but I have not found how to do ... repertory have this permission "drwxr-xr-x root root" and i execute him in web-server (apache) and Symfony. Error : The exit status code '126' says something went wrong: stderr: "sh: 1: /var/chroot/wkhtmltox-jessie-amd64: Permission denied " stdout: "" Can you help me ? 回答1: I encountered the same problem on the

Wkhtmltopdf not displaying TrueType fonts

心不动则不痛 提交于 2019-12-10 09:55:50
问题 We're using wkhtmltopdf to render a PDF from an HTML page however fonts such as Verdana and Georgia aren't being displayed properly. We installed the TrueType fonts on our server using these instructions. Fonts are being set inline using style tags: style="font-family: verdana, geneva;" Any suggestions on what we can try next to get these fonts to display would be appreciated. 回答1: Try Arman H.'s solution posted over on this question: Google Web Fonts and PDF generation from HTML with