wkhtmltopdf

How to avoid page break inside table row for wkhtmltopdf

老子叫甜甜 提交于 2019-11-26 17:13:15
I am generating pdf report from html page with one table . I am using wkhtmltopdf for the purpose. when pdf is generated it breaks anywhere in tr tag . I want to avoid it . Nenotlep Update 17.09.2015: Check the version you are using: wkhtmltopdf 0.12.2.4 is said to fix the problem (I have not checked) . This is a known issue in wkhtmltopdf. The page breaking algorithm used by webkit (the WK in WKhtmltopdf) doesn't really work well for large tables. I suggest breaking the table down to smaller chunks that are more easily split to pages and using the css a lot: table, tr, td, th, tbody, thead,

use custom fonts with wkhtmltopdf

∥☆過路亽.° 提交于 2019-11-26 16:05:43
问题 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

Google Web Fonts and PDF generation from HTML with wkhtmltopdf

两盒软妹~` 提交于 2019-11-26 11:55:23
问题 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

How to install wkhtmltopdf on a linux based (shared hosting) web server

元气小坏坏 提交于 2019-11-26 11:53:39
问题 I have tried in all ways to get wkhtmltopdf installed on our web server but unfortunately it is not getting installed. I cannot access user/bin folder as stated in a tutorial on installation. On the server in public_html folder there is a sub folder _vti_bin , I copied the file wkhtmltopdf-i386 from wkhtmltopdf-0.9.1-static-i386 , but I am not able to execute it. How to install wkhtmltopdf on (shared hosting) web server and get it working? 回答1: I've managed to successfully install wkhtmltopdf

How do I get WKHTMLTOPDF to execute via PHP?

拜拜、爱过 提交于 2019-11-26 10:27:51
问题 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

How to avoid page break inside table row for wkhtmltopdf

萝らか妹 提交于 2019-11-26 06:05:07
问题 I am generating pdf report from html page with one table . I am using wkhtmltopdf for the purpose. when pdf is generated it breaks anywhere in tr tag . I want to avoid it . 回答1: Update 17.09.2015: Check the version you are using: wkhtmltopdf 0.12.2.4 is said to fix the problem (I have not checked). This is a known issue in wkhtmltopdf. The page breaking algorithm used by webkit (the WK in WKhtmltopdf) doesn't really work well for large tables. I suggest breaking the table down to smaller

avoid page break inside row of table

﹥>﹥吖頭↗ 提交于 2019-11-26 04:18:53
问题 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. 回答1: You might try this with CSS: <table class="print-friendly"> <!-- The rest of your table here -->

wkhtmltopdf: cannot connect to X server

心不动则不痛 提交于 2019-11-26 04:05:37
问题 I have been using wkthmltopdf to convert html to pdf documents on-the-fly on my linux web server. The program originally needed X11 or similar X server to run correctly, but through many requests by developers to have this run on servers without GUI, I am pretty sure it runs a virtual X server in the static version. I have been using the static (stand-alone) version of the program and it works great! I would put the executable file in a folder, and run: ./wkhtmltopdf file1.html file2.pdf

Calling wkhtmltopdf to generate PDF from HTML

烈酒焚心 提交于 2019-11-26 02:41:44
问题 I\'m attempting to create a PDF file from an HTML file. After looking around a little I\'ve found: wkhtmltopdf to be perfect. I need to call this .exe from the ASP.NET server. I\'ve attempted: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.FileName = HttpContext.Current.Server.MapPath(\"wkhtmltopdf.exe\"); p.StartInfo.Arguments = \"TestPDF.htm TestPDF.pdf\"; p.Start(); p.WaitForExit(); With no success of any files being created on the server. Can anyone give me a