wkhtmltopdf

where to add page-break related css in wkhtmltopdf?

二次信任 提交于 2019-12-22 05:41:32
问题 I am using wkhtmltopdf 0.12.3.2 on Windows. I know there are a lot of questions and answers around this topic, but I still can't find an answer to my problem; I don't know where to put the according CSS - or the CSS doesn't work for some (other) reason: for example i tried to put the page-break related CSS directly into my html file which i want to render. i tried to force page-breaks with <span class="break_here"></span> in my <body> : <!-- ... --> <head> <style> span.break_here { page-break

Highcharts charts on a page not rendering correctly when output to PDF using wkhtmltopdf

霸气de小男生 提交于 2019-12-22 00:11:52
问题 My wkhtmltopdf PDF output of a page with several Highcharts charts on it is missing some elements of the charts, primarily all of the simple straight lines, including tick marks, grid lines, column borders, legend borders and the lines in my line/spline charts (data points display). I have tried the tricks used to solve this issue from other stack questions, namely setting all of the following on the series: enableMouseTracking: false, shadow: false, animation: false ...as well as setting

Problems serving a binary image passed through stdout with Node

和自甴很熟 提交于 2019-12-21 23:41:26
问题 I'm attempting to create a node server that serves up a png image generated using the node-wkhtml module (basically just a wrapper for the wkhtmltoimage/wkhtmltopdf command line utility). Here's what I have so far: var http = require('http'); var Image = require("node-wkhtml").image(); http.createServer(function (request, response) { new Image({ url: "www.google.com" }).convert (function (err, stdout) { //var theImage = new Buffer (stdout, 'binary'); response.writeHead(200, {'Content-Type' :

node wkhtmltopdf create corrupted PDF in node webkit

心已入冬 提交于 2019-12-21 21:33:32
问题 Im having a lot of trouble in node webkit to convert html to PDF. Im using wkhtmltopdf 0.12.1 and did the npm install wkhtmltopdf. Here is my node code: var wkhtmltopdf = require('wkhtmltopdf'); var fs = require("fs-plus"); // URL wkhtmltopdf('http://google.com/', { pageSize: 'letter' }) .pipe(fs.createWriteStream('out.pdf')); It gave me an error. Later I found this https://github.com/devongovett/node-wkhtmltopdf/pull/9 I did the correcting and im not getting any error anymore but the PDF

wkhtmltopdf and forms based authentication

萝らか妹 提交于 2019-12-21 19:14:10
问题 I have an application that uses forms based authentication. I'm trying to take a copy of a page within the application and save it to PDF using wkhtmltopdf. wkhtmltopdf is installed and works fine. I can call it successfully from within the application to generate a PDF of another website without authentication (i.e. bbc.co.uk). I cannot get it to pass username/password to the application in order to generate a copy of the desired page. Instead I get a PDF of the signon screen. Both client

How to use wkhtmltopdf in Java web application?

久未见 提交于 2019-12-21 09:02:11
问题 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). 回答1: First, a technical note: Because you want to use wkhtmltopdf in a web project, if and when you deploy

wkhtmltopdf segfaults

旧时模样 提交于 2019-12-21 07:59:08
问题 I am trying to put wkhtmltopdf onto a virtualbox'ed ubuntu 12.04 64bit server. So far no luck. The package from the repositories wants to have xserver running and the static version: wkhtmltopdf google.com tesss.pdf Loading pages (1/6) QSslSocket: cannot resolve SSLv2_client_method ] 10% QSslSocket: cannot resolve SSLv2_server_method Counting pages (2/6) Resolving links (4/6) Loading headers and footers (5/6) Printing pages (6/6) QPixmap: Cannot create a QPixmap when no GUI is being used===]

wkhtmltopdf missing SVG paths (Rendering)

拈花ヽ惹草 提交于 2019-12-21 07:02:54
问题 I'm using a image inside the HMTL code like here below: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test</title> </head> <body> <svg height="291pt" version="1.1" viewBox="0 0 291 291" width="291pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <style type="text/css">*{stroke-linecap:butt;stroke-linejoin:round;} </style> </defs> <g id="figure_1"> <g id="patch_1"> <path d="M 0 291.4 L 291.4 291.4 L 291.4 0 L 0 0 z" style="fill:none;"><

How to run custom Javascript on Wkhtmltopdf/wkhtmltoimage?

十年热恋 提交于 2019-12-21 04:49:12
问题 I want to run a javascript on a website, but when I do it, nothing changes, I get the pdf as if I run no result of the javascript on it, this is an example of what I do: xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltoimage --run-script "javascript:(\$(function(){ \$("div").hide() ;}))" google.com google.png I have also scripts without jquery like: xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf --run-script "javascript:(function(){ document.write(

How to install wkhtmltopdf with patched qt?

我怕爱的太早我们不能终老 提交于 2019-12-20 09:48:35
问题 I want to convert html to pdf, and I use wkhtmltopdf. But print size is smaller than I supposed. I want to try --disable-smart-shrinking option but error occured like $ xvfb-run -- /usr/bin/wkhtmltopdf --disable-smart-shrinking $INPUT $OUTPUT The switch --disable-smart-shrinking, is not support using unpatched qt, and will be ignored.Loading page (1/2) Printing pages (2/2) Done Maybe I have to install wkhtmltopdf with patched qt, but I don't know how to install. I saw following size, but