wkhtmltopdf

wkhtmltopdf + mixed photo colors

心不动则不痛 提交于 2019-12-08 04:43:24
问题 I have a page with color and black & white images, when I use wkhtmltopdf to generate a pdf from the html file, I get only the color images, how can I get it to print all the images, I have tried the advance options, but no success. If I print in grayscale, then all the images are coming, but I don't want grayscale. Any help? 回答1: I figured out how to solve this problem, I tried a trial-and-error method and figured out that if we provided the following parameters all the images irrespective

WKHTMLTOPDF - Allow page break in table row

断了今生、忘了曾经 提交于 2019-12-08 04:28:38
问题 I'm running wkhtmltopdf 0.12.2.1 (with patched qt) on my Ubuntu server and I can generate PDFs just fine. I've been using wkhtmltopdf to generate a table with several columns and sometimes one of those columns has a LOT of text. My problem is this: I want my table rows to be able to span multiple pages without leaving white space before/after the row. WKHTMLTOPDF does some of this work for me, but it often leaves unwanted white space before the row if the row has lots of text because

HTML to PDF conversion in php online

送分小仙女□ 提交于 2019-12-08 03:22:34
问题 I've been trying to develop a php program that can convert an html file to pdf. I Googled the issue and found out this software wkHTMLtoPDF software which can be used for this purpose. I downloaded it for the windows and i successfully created what i wanted to using these lines: $wkcommand = "\"C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf\" --page-width 300 --page-height 225 \"$url\" $dir\\$tempName.pdf &"; exec($wkcommand, $output, $error); As these lines run in command line and works

How to use Wkhtmltopdf converter with filled text boxes?

你。 提交于 2019-12-08 02:39:43
问题 I need to convert several aspx pages to PDF when a button is clicked. This happens after many text boxes are filled and other controls are selected, etc. Wkhtmltopdf renders the pdf very nicely but everything is blank. Basically, when the PDF is created it is in the state that the form was in on load. I want the PDF to be in the state that the form is in when the button is pressed. I need ideas for a way to work around this issue in order to save the pdf with the text boxes filled. 回答1:

wkhtmltopdf with javascript-delay not working

Deadly 提交于 2019-12-08 02:14:32
问题 The pdf that is created using the code below hasn't finished rendering the javascript so javascript was preformed on half of the tables (say if there are 100 tables then sometimes 50 are done, other times 52, 54 etc). I'm using the flag --javascript-delay 40000 in trying to delay the retrievement of the page but the results are the same. It's still pulling the trigger too fast. I know this is the issue because when I use the browser everything works correctly. How can I set the delay properly

highcharts display in my render html page which i want to convert into PDF using wkhtmltopdf in rails

大城市里の小女人 提交于 2019-12-08 01:39:23
问题 I have an html page with some text data and graph. I am using wkhtmltopdf gem to generate pdf from html page. Using highcharts, i am generating graph. I am able to generate PDF successfully but PDF only contains text data and doesn't have graph in it. I already tried with some options as below - plotOptions: { series: { enableMouseTracking: false, shadow: false, animation: false } }, in Hightcharts jquery coding.. Please assist me to resolve this issue. 回答1: I am not familiar w/wkhtmltopdf

return pdf response from stdout with Django

回眸只為那壹抹淺笑 提交于 2019-12-07 14:16:40
问题 I am using wkhtmltopdf to create PDF files, how ever I don't know how to return them properly, so I had to write them to my media folder and then redirect to the just created file. Edit: Ian's advice is to write to STDOUT, so I have changed my wkhtmltopdf command to do that, but now I don't know how to return that content. I have been trying using subprocess.Popen this way: r = HttpResponse(Popen(command_args), mimetype='application/pdf') r['Content-Disposition'] = 'filename=recibos.pdf'

What is the Debian equivalent of urw-fonts (needed for utf-8 in wkhtmltopdf)?

假如想象 提交于 2019-12-07 11:33:42
问题 I'm trying to convert an html document with text in multiple languages (utf-8 encoding) to pdf using wkhtmltopdf, and ran into the exact issue described here: Squared characters issue on wkhtmltopdf The most popular answers there are to install urw-fonts, which seems to have worked for many people with this issue. But when I search for this package in the Debian apt repository, it doesn't find anything. Someone suggested installing gsfonts-x11, but that didn't fix the issue. My question is:

Issue running 32-bit executable on 64-bit Windows

China☆狼群 提交于 2019-12-07 10:40:59
问题 I'll add 500 of my own rep as a bounty when SO lets me. I'm using wkhtmltopdf to convert HTML web pages to PDFs. This works perfectly on my 32-bit dev server [unfortunately, I can't ship my machine :-p ]. However, when I deploy to the web application's 64-bit server the following errors are displayed: (running from cmd.exe) C:\>wkhtmltopdf http://www.google.com google.pdf Loading pages (1/5) QFontEngine::loadEngine: GetTextMetrics failed () ] 10% QFontEngineWin: GetTextMetrics failed ()

Wicked pdf not rendering header/footer

元气小坏坏 提交于 2019-12-07 06:28:50
问题 I am using wicked_pdf for generating pdf from html on my rails project. It is rendering template but I could not manage to print header/footer sections. Below is my code that print only template section render pdf: "pdf_name", layout: 'application', template: 'reports/show', formats: [:html], margin: { top: 10, bottom: 10, left: 10, right: 10 }, disable_javascript: true, show_as_html: params[:debug], header: { html: { template: 'shared/header' }, spacing: 10 }, footer: { html: { template: