wkhtmltopdf

Debugging javascript in wkhtmltopdf

我是研究僧i 提交于 2019-11-29 16:30:28
问题 Where I can see the output of javascript debug when wkhtmltopdf runs in debug mode (--debug-javascript) 回答1: Another (I would say easiest) means of debugging javascript in WKHTMLTOPDF is to download QT Browser, the underlying browser used by WKHTMLTOPDF, and to inspect the javascript execution for your page from within the browser. You can download it from here Instructions on debugging javascript in QT here You can basically debug your JavaScript in QT Browser just as you would in Chrome or

TuesPechkin unable to load DLL 'wkhtmltox.dll'

人走茶凉 提交于 2019-11-29 13:18:32
I've been using TuesPechkin for some time now and today I went to update the nuget package to the new version 2.0.0+ and noticed that Factory.Create() no longer resolved, so I went to read on the GitHub the changes made and noticed it now expects the path to the dll? IConverter converter = new ThreadSafeConverter( new PdfToolset( new StaticDeployment(DLL_FOLDER_PATH))); For the past few hours I've tried almost all the paths I can think of, "\bin", "\app_data", "\app_start", etc and I can't seem to find or figure out what it wants for the path and what dll? I can see the TuesPechkin dll in my

rails 3 and PDFkit

狂风中的少年 提交于 2019-11-29 08:39:49
I'm trying to follow this tutorial . When I'm adding .pdf to my url it does nothing. My controller has: respond_to :html, :pdf. My mime type has been declared. I tried this too: respond_to do |format| format.html format.pdf { html = render_to_string(:layout => false , :action => "www.google.fr") kit = PDFKit.new(html) send_data(kit.to_pdf, :filename => "candidats.pdf", :type => 'application/pdf') return # to avoid double render call } end but it does not work and I don't get errors. My browser keep waiting for localhost, but nothing happens. So how should I try to use pdfkit ? edit 2 :

wkhtmltopdf failure when embed an SVG

谁说我不能喝 提交于 2019-11-29 05:47:13
Has anyone in this vast space has ever had the luck to successfully create a PDF with an embedded SVG on an HTML? I've been receiving segmentation fault all the time. Or perhaps is there any other way to embed an SVG into an HTML file and then export it to PDF instead of wkhtmltopdf ? Yuriy Chemerys I had similar problem. Seems like javascript embedded in SVG image can cause segmentation fault. I was generating SVG graphs using pygal Python module. To successfully generate PDF from HTML with SVG graphs I had to do several things: Remove reference to javascript. (In case of pygal add js=() key

WkHTMLtoPDF not loading local CSS and images

三世轮回 提交于 2019-11-29 04:43:15
问题 I've seen multiple questions that are very similar to this one, so I was hesitant at first to post it. But nothing suggested resolved my issue and I can't seem to figure out what's wrong myself. For a project I made for one client they wanted to ability to convert quotes for their customers (generated using an online form) to PDFs. Simple enough. As the entire project was in PHP, I used the following simple process: Save the quote as a temporary HTML file Use WkHTMLtoPDF to convert the HTML

Execute command line via php?

风流意气都作罢 提交于 2019-11-29 04:29:18
How I can execute those two command line via php: wkhtmltopdf www.google.com gg.pdf & oofice -headless -nologo -pt cup-pdf my.doc they both return a pdf file and download into my home directory. I want to know the way to execute those command from my html page via php. Thanks. You should take a look at the System program execution section of the manual : PHP provides several functions that can be used to launch external commands / programs, including : exec() -- which can store the output of the command in an array shell_exec() -- which returns, as a string, the output of the command system()

Wkhtmltopdf fails to printing SVG path (highchart)

浪子不回头ぞ 提交于 2019-11-29 04:06:52
I am trying to create a PDF from a JS highchart chart, like this one: http://www.highcharts.com/stock/demo/ It needs JS delay so wkhtmltopdf --javascript-delay 1000 http://www.highcharts.com/stock/demo/ pdftest1.pdf In the result I see only a grey thick line. I'm using the version 0.11.0 rc2 of the component on Windows 7. Is anyone else experiencing the same issues? Here a workaround . The trick is to set plotOptions.series.enableMouseTracking to false. This because the gray line is the "mouse track" area of the chart and for some reasons it's not hidden by wkhtmltopdf. A bit late to the party

wkhtmltopdf: What paper sizes are valid?

丶灬走出姿态 提交于 2019-11-29 01:36:41
I am using wkhtmltopdf(html to pdf converter) and am running it through a php shell_exec . When running wkhtmltopdf --help one option is size, with the help text being Set paper size to: A4, Letter, etc. I am wondering if someone has a list of paper sizes this executable will run? The specific version is wkhtmltopdf-0.9.9-static-i386 If you take a look through the pdfsettings.cc source in the project repository , you'll find this list, which looks to me like the accepted list of named paper sizes. res["A0"] = QPrinter::A0; res["A1"] = QPrinter::A1; res["A2"] = QPrinter::A2; res["A3"] =

Mixing page orientations in wkhtmltopdf

隐身守侯 提交于 2019-11-29 01:31:23
I'm using wkhtmltopdf to produce a PDF from a single HTML file, formatted into separate pages using page-break-before: always . For example: <div class="cover"> Cover Page </div> <div class="page"> Page 1 </div> <div class="page"> Page 2 </div> With CSS: .page { page-break-before: always; } Right now, I have the wkhtmltopdf command written to print the PDF in portrait orientation on letter-size pages. I need one of the pages to be in landscape orientation and the rest to be in portrait orientation (so that when the PDF is viewed on screen, all of the content will be oriented correctly). Is

Help installing static binary for wkhtmltopdf

余生颓废 提交于 2019-11-28 23:06:59
问题 I am trying to use the static binary of wkhtmltopdf on Ubuntu server 10.0.4. The reason for is that it apparently has a built in modified QT that will allow me to run wkhtmltopdf without an X Server. Result: Once installed (see steps below), when I execute wkhtmltopdf in the terminal, it does not fire up... just returns me to the prompt - like it ran and did something, no error but no output: :/usr/bin$ wkhtmltopdf :/usr/bin$ Same behavior if I put args: :/usr/bin$ wkhtmltopdf http://www