wkhtmltopdf

Squared characters issue on wkhtmltopdf

此生再无相见时 提交于 2019-11-27 13:28:05
问题 I've installed wkhtmltopdf on Centos 5.5. (Since there was library issues, it's been 4 days). It's partly working now. I said partly because, all pdfs which was created by wkhtmltopdf include squares instead of text? What can I do? I've searched google, but I couldn't find anything. Appreciate your help. 回答1: When I had the black squares issue I was able to solve it without installing X11 by installing the urw-fonts package. 回答2: I was able to solve this problem using the following resource:

use custom fonts with wkhtmltopdf

好久不见. 提交于 2019-11-27 12:40:54
I am trying to use custom fonts in my PDF generated with wkhtmltopdf. I read that you can't use google webfonts and that wkhtmltopdf uses truetype .ttf file. Can anyone confirm that? So I downloaded a .ttf file from google webfont and put in on my server, then used the font face: @font-face { font-family: Jolly; src: url('../fonts/JollyLodger-Regular.ttf') format('truetype'); } and font family: <style type = "text/css"> p { font-family: 'Jolly', cursive; } </style> And now the text that is supposed to render with Jolly Lodger font doesn't appear at all, page is blank. What am I doing wrong? PS

How to do page numbering in header/footer htmls with wkhtmltopdf?

两盒软妹~` 提交于 2019-11-27 09:40:43
问题 I'm developing an electronic invoicing system, and one of our features is generating PDFs of the invoices, and mailing them. We have multiple templates for invoices, and will create more later, so we decided to use HTML templates, generate HTML document, and then convert it to PDF. But we're facing a problem with wkhtmltopdf, that as far as I know (I've been Googleing for days to find the solution) we cannot simply both use HTML as header/footer, and show page numbers in them. In a bug report

Process.Start in Azure Website

半城伤御伤魂 提交于 2019-11-27 08:09:11
问题 I have an ASP.NET MVC 5 app where I need to invoke wkhtml2pdf.exe in my Azure website using Process.Start . Locally everthing works fine. But it seems my app stuck at Process.Start line. Is starting a process is supported on Azure? 回答1: ramiramilu's answer is actually not correct. You can run any exe you want (check this for example). The problem you are hitting is not in running an exe, it's something specific to wkhtml2pdf.exe itself. That exe uses a bunch of GDI+ calls on Windows for

Google Web Fonts and PDF generation from HTML with wkhtmltopdf

耗尽温柔 提交于 2019-11-27 06:13:55
I am using wkhtmltopdf to convert HTML files in PDF format; it gives surprisingly good results, rendering the PDF exactly as WebKit would do. I am using Google Web Fonts to give users the possibility to customize the appearence of the document they edited, offering them the possibility to choose between a few fonts. It also works perfectly in a browser . Problem is, I don't get the Google Fonts working when converting such HTML files to PDF with wkhtmltopdf. I read other people had the same issue . Could anyone please help me fixing this? EDIT : declaring @font-face directly in the CSS does

helvetica font not working in wkhtmltopdf

爱⌒轻易说出口 提交于 2019-11-27 05:39:32
问题 I have been trying to use Helvetica font while creating the pdf but the font is not reflected back in pdf. I did some google and found some solutions but none are workable. Tried Solution 1 I found similar thing here : Font issue Tried the last solution mentioned over there workaround is to define @font-face in your css and have src link to external host that is accessible by wkhtmltopdf But the solution is not working. Tried Solution 2 I also tried to use google font api, but result is still

How do I get WKHTMLTOPDF to execute via PHP?

倾然丶 夕夏残阳落幕 提交于 2019-11-27 03:14:59
This has been asked to some degree before but there are no solutions or accepted answers and I'd like to try and be more comprehensive in my question so: I'm trying to WKHTMLTOPDF up and running via PHP on a shared server (in this case it's MediaTemple (gs)). According to the host there is no reason this won't work and in fact it is working via SSH. So... I've tried a variety of things, the most basic does nothing, just silently fails: exec("/path/to/binary/wkhtmltopdf http://www.google.com pdf1.pdf"); - Source: Question on Stack Overflow The full PHP bindings along with the following give me

HTML2PDF in PHP - convert utilities & scripts - examples & demos

喜你入骨 提交于 2019-11-26 23:17:25
问题 I have a quite complicated HTML/CSS layout which I would like to convert to PDF on my server. I already have tryed DOMPDF, unfortunately it did not convert the HTML with correct layout. I have considered HTMLDOC but I have heard that it ignores CSS to a large extent, so I suppose the layout would break apart with that tool too. My question therefor is - are there any online demos for other tools (like wkhtmltopdf i.e.) that I could use to verify how my HTML is converted? Before spending the

How to use wkhtmltopdf.exe in ASP.net [duplicate]

故事扮演 提交于 2019-11-26 22:32:35
问题 This question already has answers here : Calling wkhtmltopdf to generate PDF from HTML (11 answers) Closed 5 years ago . After 10 hours and trying 4 other HTML to PDF tools I'm about ready to explode. wkhtmltopdf sounds like an excellent solution...the problem is that I can't execute a process with enough permissions from asp.net so... Process.Start("wkhtmltopdf.exe","http://www.google.com google.pdf"); starts but doesn't do anything. Is there an easy way to either: -a) allow asp.net to start

avoid page break inside row of table

為{幸葍}努か 提交于 2019-11-26 18:37:13
I want to avoid page break inside row of table in html, when I convert html to PDF by wkhtmltopdf. I use page-break-inside:avoid with table- its works, but I have so many rows, then not work. If set display of tr as block or some thing else then it change the formatting of table and insert double border. Or it is possible to insert the table header on each page, where the table was splitted. You might try this with CSS: <table class="print-friendly"> <!-- The rest of your table here --> </table> <style> table.print-friendly tr td, table.print-friendly tr th { page-break-inside: avoid; } <