wkhtmltopdf

Django wkhtmltopdf don't reading static files

怎甘沉沦 提交于 2020-02-02 11:47:20
问题 I use wkhtmltopdf with django-wkhtmltopdf and I think I have incorrectly serving static files. If I run wkhtmltopdf from the console are properly collected static files and generates a good pdf file: wkhtmltopdf http://127.0.0.1:8000/dash/test/ test.pdf "GET /static/base/js/jquery.js HTTP/1.1" 200 93106 "GET /static/base/css/bootstrap.css HTTP/1.1" 200 119892 "GET /static/base/js/bootstrap.min.js HTTP/1.1" 200 27726 "GET /static/dash/css/flot.css HTTP/1.1" 200 1810 "GET /static/dash/js/jquery

wkhtmltopdf keep font size issue

情到浓时终转凉″ 提交于 2020-01-24 20:55:06
问题 I'm converting a html file to pdf with wkhtmltopdf 0.12.1.2 and the font sizes are different on the output, the font size is 13.68 but it's 11pt in the html. Any help on getting it to match? <span style="font-family: Calibri; font-size: 11pt; "> <table> <tbody> <tr><td>this is a test Calibri 11pt font</td></tr> etc etc wkhtmltopdf32.exe --disable-smart-shrinking --page-width 215.900000 --page-height 279.400000 1.htm 1.pdf even if I remove the page size it's still the same. 回答1: This issue is

Converting MathJax into pdf with wkhtmltopdf yields too small maths

限于喜欢 提交于 2020-01-24 18:08:05
问题 By using pdfkit-python based on wkhtmltopdf , I have managed to convert MathJax into pdf. wkhtmltopdf configuration options are the following: options = { 'quiet': '', 'javascript-delay' : '5000', 'page-size': 'A4', 'margin-top': '0.75in', 'margin-right': '0.75in', 'margin-bottom': '0.75in', 'margin-left': '0.75in', 'disable-smart-shrinking': '', 'dpi': '400', } This allows to obtain the markdown text that is large as expected, however maths do not scale accordingly. Here a snapshot of the

Table headers overlapping content on second page when converting to PDF with wkhtmltopdf

有些话、适合烂在心里 提交于 2020-01-17 12:13:05
问题 I have a table that is spanning across multiple pages. The thead is being repeated on the second page and is overlapping the content. I am using bootstrap and have ensured the css from other wkhtmltopdf overlap solutions are implemented in my page. thead { display: table-header-group; } tfoot { display: table-row-group; } tr { page-break-inside: avoid; } table, tr, td, th, tbody, thead, tfoot, td div { page-break-inside: avoid !important; } 回答1: The table was wrapped in a <div class="table

Errno 13 Permission denied in django-wkhtmltopdf

纵饮孤独 提交于 2020-01-15 06:42:07
问题 I use django-wkhtmltopdf to generate PDF documents. I described a clear path to the django-wkhtmltopdf. WKHTMLTOPDF_CMD = '/home/vagrant/envs/vagrant/lib/python2.7/site-packages/wkhtmltopdf' I get the error: [Errno 13] Permission denied Permissions in the path to the django-wkhtmltopdf: drwxrwxr-x 3 vagrant vagrant Feb 17, 4096 7:32 wkhtmltopdf 回答1: You need to install wkhtmltopdf itself, and specify the path to the binary (either in /usr/bin or /usr/local/bin). 回答2: What worked for me was:

How to print formatted html in Linux server

核能气质少年 提交于 2020-01-11 13:01:51
问题 ASP.NET MVC 4 application runs in Debian Squeeze Linux using Mono. Controller creates html document like code below. html contains simple positioning divs and formatting instructions. Linux server is running in internet provider and there are no desktop components installed. Additional components can installed if required. This is older, squeze x64 linux. How to print this html file to Samsung printer connected to server ? It there some executable which can used for this ? wkhtmltopdf and

How to print formatted html in Linux server

浪子不回头ぞ 提交于 2020-01-11 13:01:26
问题 ASP.NET MVC 4 application runs in Debian Squeeze Linux using Mono. Controller creates html document like code below. html contains simple positioning divs and formatting instructions. Linux server is running in internet provider and there are no desktop components installed. Additional components can installed if required. This is older, squeze x64 linux. How to print this html file to Samsung printer connected to server ? It there some executable which can used for this ? wkhtmltopdf and

Bash: No such file or directory?

故事扮演 提交于 2020-01-11 03:25:08
问题 I try to use an executable script (wkhtmltopdf) on a Linux shared webserver (Debian, 64bit). I am pretty sure that I compiled everything correct, but whenever I want to execute the file I get as an response : > ./wkhtmltopdf -H -bash: ./wkhtmltopdf: No such file or directory To be sure that the file is there, here the ls output : > ls wkhtmltoimage wkhtmltopdf Furthermore I tested the file command on it, which outputs the following : > file wkhtmltopdf wkhtmltopdf: ELF 64-bit LSB executable,

Add content to the bottom of the last page

送分小仙女□ 提交于 2020-01-10 07:43:09
问题 I am using wkhtmltopdf to create PDF reports from HTML, I need to create a custom report that follows this pattern: Some information at the top of the first page. A table that can have 1 to n rows (it should use any amount of pages it needs) Some information at the end of the last page. Putting all this together does the trick; however because step 3 info appears immediately after the table, is there a way to put the content at the end of the page? I am not even sure if this solution is CSS

wkhtmltopdf: What paper sizes are valid?

梦想的初衷 提交于 2020-01-09 19:25:19
问题 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 回答1: 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