wkhtmltopdf

C# html to pdf converter using wkhtmltopdf or any other free tools [closed]

旧城冷巷雨未停 提交于 2019-12-10 09:07:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . What is the perfect tool for converting html to pdf in C# ?? I have found wkhtmltopdf through stackoverflow.com . But its not working . showing this message in time of converting "www.google.com" in command line. C:\Program Files\wkhtmltopdf>wkhtmltoimage.exe www.google.com go.pdf Loading page (1/2) Rendering (2

How to install phpwkhtmltopdf

不问归期 提交于 2019-12-09 22:19:49
问题 I am trying to install phpwkhtmltopdf on shared server (webhotel). The server has already composer installed, and I have SSH to server. But I am not too familiar with composer so I might be doing someting very basic wrong here.. So, I have downloaded the zip file from: https://github.com/mikehaertl/phpwkhtmltopdf and extracted the files on it to server to directory named as phpwkhtmltopdf. Then, opening SSH cd-ing to that dir and running composer require mikehaertl/phpwkhtmltopdf but I only

wkhtmltopdf generates tiny output on Mac

雨燕双飞 提交于 2019-12-09 21:28:14
问题 I'm running wkhtmltopdf 0.12.4 on Mac OS 10.11.6. When I try to run the basic example "wkhtmltopdf http://google.com google.pdf", though, I'm getting an unusual output. Where I'm expecting something like this: (PDF generated directly from Chrome), I'm instead getting this: It seems odd to me that the default output should be so far off, but I've tried some options as well (including --disable-smart-shrinking) with no luck. Would appreciate any direction you can offer! 回答1: I had the same

Execute wkhtmltopdf from PHP

时光怂恿深爱的人放手 提交于 2019-12-09 15:08:36
问题 I have this working fine from Linux command line: wkhtmltopdf entry.html output.pdf But the following doesn't work from PHP code: exec ('wkhtmltopdf entry.html output.pdf'); Interesting, I've googled and a lot of non-checked solutions and with no explanation why this is a problem. Thanks if you have the good ones. 回答1: wkhtmltopdf has bindings, one of them is for PHP. You could give those a shot. 回答2: had the same problem and i don't think anyone else should waste > 3 hours: the solution is

Python configure pdfkit on windows

走远了吗. 提交于 2019-12-09 13:53:08
问题 I started to learn python recently and I want to convert existing html file to pdf file. It is very strange, but pdfkit seems to be the only lib for pdf docs for python. import pdfkit pdfkit.from_file("C:\\Users\\user\Desktop\\table.html", "out.pdf") An error occurs: OSError: No wkhtmltopdf executable found: "b''" How to configure this lib properly on windows to make it work? I can't get it :( 回答1: It looks like you need to install wkhtmltopdf. For windows, the installer can be found at https

How to remove the Table of Contents from the Table of Contents in WKHTMLTOPDF?

别等时光非礼了梦想. 提交于 2019-12-09 12:04:38
问题 I am generating a pdf using WKHTMLTOPDF with the table of content option, but it is adding itself to the table of contents, showing that it is on page 2. Thoughts on removing this? 回答1: You have full control over the TOC generation using XSL stylesheets for their generation. You can get the default stylesheet used by giving the argument --dump-default-toc-xsl to wkhtmltopdf. When you examine it, you are particularly interested in the <body><h1>...</h1> H1 element and the test xsl:if test="(

HTML to PDF conversion in php online

三世轮回 提交于 2019-12-08 19:57:27
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 perfectly, now i want to make my website online but i can't understand how i will use this service online

wkhtmltopdf attempting to load from http rather than file

我的未来我决定 提交于 2019-12-08 16:14:22
问题 Here's an odd little problem that's led me to post my first question on SO. I am using wkhtmltopdf to convert an HTML document to a PDF as part of a Rails app. To do so, I am rendering the Rails web page to a static HTML file in a temp directory, copying a static header, footer and images to the same temp directory, then executing wkhtmltopdf using "system". This works perfectly in Development and Test environments. In my Staging env, it does not. I suspected permissions at first, but the

Insert folding marks on every page (wkhtmltopdf)

本小妞迷上赌 提交于 2019-12-08 14:39:13
问题 I'm using wkhtmltopdf 0.12.2.1 to create invoices and so on. I need to display folding marks on every page in a pdf. How can I repeat them with javascript on every page, if the content is larger than one? That's my basic markup <!DOCTYPE html> <html> <head> <title>PDF Title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body id="pdf-page"> <div class="marks"> <div class="mark mark-top mark-left"></div> <div class="mark mark-top mark-right"></div> <div

CakePHP can't find 'wkhtmltopdf' when using CakePdf plugin

给你一囗甜甜゛ 提交于 2019-12-08 12:29:01
问题 I'm stuck on a problem which has got be stumped. I've installed the CakePdf plugin as per the instructions in the Read Me file. When I get to use the plugin however, I get a CakePHP error saying the following: Pdf engine "wkhtmltopdf" not found Error: An Internal Error Has Occurred. Stack Trace APP/Plugin/CakePdf/Pdf/CakePdf.php line 193 → CakePdf->engine(string) APP/Plugin/CakePdf/View/PdfView.php line 74 → CakePdf->__construct(array) APP/Plugin/CakePdf/View/PdfView.php line 64 → PdfView-