wkhtmltopdf

WKHTMLTOPDF Dynamic Header on every page

穿精又带淫゛_ 提交于 2019-12-11 04:15:33
问题 I am trying to produce a PDF file using WKHTMLTOPDF library in NODE for a large HTML file. I need to be able to stuff in some content in the Header and Footer on every page. But the content on the header changes on every page for e.g, have custom numbering in a format like BX008761. The number should increment on every page. First page will be BX008761, second page BX008762, third BX008763 so on.. I could find a thread which is related.. WKHTMLTOPDF -- Is possible to display dynamic headers?

Installing WKHTMLtoPDF 0.12.x 64 bit on Ubuntu 12.04.5 (Dreamhost VPS)

孤者浪人 提交于 2019-12-11 03:07:58
问题 I'm trying to install WKHTMLtoPDf 0.12.x on a Dreamhost VPS running Ubuntu 12.04.5. I found a realatively new resource and it seems like it should be pretty straight forward: sudo add-apt-repository ppa:pov/wkhtmltopdf sudo apt-get update sudo apt-get install wkhtmltopdf But, it tells me the user I'm SSH'd in with using Putty is not in the Sudoers file, and the incident will be reported. Is this the right way to install wkhtmltopdf on the Dreamhost VPS? and if so how do you add a user to the

PHP: Cannot exec() wkhtmltopdf: “sh: /usr/bin/wkhtmltopdf: Permission denied”

假装没事ソ 提交于 2019-12-11 03:04:54
问题 I am not really into unix and that's why this thing is kind of weird for me. The OS is CentOS 6. I read nearly all topics concerning wkhtmltopdf, but my problem still exists. Actually it's not a wkhtmltopdf problem, but a permission problem. To sum it up: wkhtmltopdf works in the command line, but not with php exec(). But wget works fine with php exec(): I can execute wkhtmltopdf in the command line, works fine: /usr/bin/wkhtmltopdf "test.de" "/var/www/html/test/test.pdf" 2>&1 I can execute

WickedPDF different margin settings for first page?

自作多情 提交于 2019-12-11 02:57:43
问题 Using: wkhtmltopdf-binary 0.9.9.1 wicked_pdf 0.10.2 rails 4.1.7 ruby 2.1.3 OS X 10.10.1 (64-bit) I have a header that takes a bit of space, so I had to use :margin => { :top => 40 } (along with header spacing) in my WickedPDF options. However, I don't want this for my first page , because the header is only used on page 2 and above. How do I achieve this? Attempts For contents in the first page, via CSS I tried: position: absolute; top: -20; Which results in the content being "clipped" by the

Images in Html to PDF using wkhtmltopdf in mvc 4

↘锁芯ラ 提交于 2019-12-11 02:14:50
问题 I am using wkhtmltopdf to convert html to pdf. I am using mvc 4. I was able to convert html to pdf. The only problem I have is that images do not render. There is small rectangle where image should appear. I have my images in database so when I get html string in my controller this is how image is shown right before I pass this string to converter: <img src="/Images/Image/GetImageThumbnail?idImage=300" alt=""/> So I am thinking that this approach is not working becuase I pass string to

Removing a “Print” button Before Rendering PDF from View - MVC3

久未见 提交于 2019-12-11 01:09:12
问题 I have a view that I pass to Rotativa (wkhtmltopdf) to get a PDF version of the view for users to print, once they click the "print button": Here is the rendered view that will be converted to PDF if the user clicks the "print" button Here is the button code from the view <div id="print-pdf" align="center"> <a id="print-me" class = "print-btn" href='@Url.Action("PrintMyView", "Report", new { id = Model.MonthlyReportID, clubKeyNo = Model.ClubKeyNumber, month = Model.ReportMonth, year = Model

Add page number whle converting HTML to PDF

烈酒焚心 提交于 2019-12-10 21:26:04
问题 I am using a PDF generator http://www.nrecosite.com/pdf_generator_net.aspx I would like to add the poge number as well. following is my code: string htmlContent = "...."; var generator=new NReco.PdfGenerator.HtmlToPdfConverter(); generator.Orientation = NReco.PdfGenerator.PageOrientation.Landscape; generator.PageHeaderHtml= "<img style='width:50px' src='"+HttpContext.Current.Server.MapPath("~") +"/test.png' />"; generator.PageFooterHtml = "<h1>test </h1>"; var pdfBytes = generator.GeneratePdf

Rotativa ViewAsPdf not executing jquery

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 18:19:13
问题 I'm using Rotativa (v1.6.4) for converting an MVC view into a PDF. I have used jQuery in the View to show/hide certain text content. When I render the View, I see that jQuery is working, but when I render viewaspdf, the jquery is not working. I have added --debug-javascript --no-stop-slow-scripts --javascript-delay 10000 but this looks to be not working. Can someone help me here? Here is Controller detail: public ActionResult PrintBenificiaryForm() { PrintBenificiary p = new PrintBenificiary(

Embedding SVG in PDF using Wicked_PDF (wkhtmltopdf)

余生颓废 提交于 2019-12-10 17:25:59
问题 When I try to include an SVG in a PDF generated by wicked_pdf (wkhtmltopdf), it comes out blank. Any idea how to get the svg to display in the pdf? app/views/barcodes/to_pdf.html.haml <descriptive text here> %object#code_image{:data=>"/barcodes/generate_svg?code=4567898", :type=>"image/svg+xml", :height=>70} barcodes controller def generate_svg require 'barby' require 'barby/barcode/code_128' require 'barby/outputter/svg_outputter' barcode = Barby::Code128B.new(params[:code]) render :text =>

wkhtmltopdf Issue

与世无争的帅哥 提交于 2019-12-10 17:12:39
问题 1) I uploaded"wkhtmltopdf-i386" to my server in a folder named "/pdf" 2) I uploaded the php integration script, in the same folder, and named it "wkhtmltopdf.php" (http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp) 3) I uploaded a file that I named "usage.php", in the same folder, containing : <?php require_once('wkhtmltopdf.php'); $pdf=new WKPDF(); $pdf->set_html('Hello world!'); $pdf->render(); $pdf->output(WKPDF::$PDF_EMBEDDED,'sample.pdf'); ?> 4) I created a /tmp folder with