pdf-generation

Wicked_pdf working fine in development, but not in production

两盒软妹~` 提交于 2019-12-21 21:36:24
问题 I've been working with wicked_pdf to generate some PDFs in Rails, and it's been working fine in my dev environment, but I get a 500 error (but no specific errors in my log) when I try and generate one on my production environment. The first thing I noticed was that the wkhtmltopdf binary was in a different location on my production box, so I've added the following to my wicked_pdf.rb initializer: if Rails.env == "production" WickedPdf.config = { :exe_path => '/usr/bin/wkhtmltopdf' } end Here

Azure and Rotativa PDF print for ASP.NET MVC3

余生颓废 提交于 2019-12-21 21:23:06
问题 I'm using the Rotativa PDF print for an ASP.NET MVC application to generate a pdf from html content. This works great when running the MVC application by itself on an standard IIS; the pdf is generated almost instantly. But when MVC application is deployed as a web role in Azure (both locally on a dev environment and on cloudapp.net), generating the pdf print takes up to 45 seconds, and also seems have trouble displaying content ressources (the links are broken). Some thing seems wrong, it

View RDLC Report as pdf in Asp.net MVC

时光总嘲笑我的痴心妄想 提交于 2019-12-21 20:33:59
问题 I am facing problem in last two days. I am trying to view rdlc report as pdf without reportviewer. I export rdlc to pdf using the following code... public string Export(LocalReport rpt, string filePath) { string ack = ""; try { Warning[] warnings; string[] streamids; string mimeType; string encoding; string extension; byte[] bytes = rpt.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings); using (FileStream stream = File.OpenWrite(filePath)) { stream

Find the field names of inputtable form fields in a PDF document?

不打扰是莪最后的温柔 提交于 2019-12-21 20:29:46
问题 Find the field names of inputtable form fields in a PDF document? I have an editable PDF form that I'm trying to automate the entry of form fields into using python. In order to do this I must know the "names" of the form fields in the FDF data to input. See question for background: How can I auto-populate a PDF form in Django/Python? I don't need to find the names programaticaly from the PDF necessarily, just need to know what they are so if this is possible in Preview/Adobe/etc. PDF readers

wkhtmltopdf and forms based authentication

萝らか妹 提交于 2019-12-21 19:14:10
问题 I have an application that uses forms based authentication. I'm trying to take a copy of a page within the application and save it to PDF using wkhtmltopdf. wkhtmltopdf is installed and works fine. I can call it successfully from within the application to generate a PDF of another website without authentication (i.e. bbc.co.uk). I cannot get it to pass username/password to the application in order to generate a copy of the desired page. Instead I get a PDF of the signon screen. Both client

Include ICC Colour Profile in PDF created with Objective-C iOS?

╄→гoц情女王★ 提交于 2019-12-21 17:55:34
问题 In my Objective-C iOS app I'm creating PDF files using the code: UIGraphicsPDFRenderer* renderer = [[UIGraphicsPDFRenderer alloc] initWithBounds:pdfSize]; NSData* outputPdfData = [renderer PDFDataWithActions:^(UIGraphicsPDFRendererContext * _Nonnull context) { [context beginPage]; // draw operations here }]; The ultimate aim is to then send this PDF to an AirPrinter. However, due to the printer hardware we're using it looks like it is going to be necessary to embed in to the PDF an ICC colour

How to converted SVG Files into PDF in JSPDF using javascript

╄→гoц情女王★ 提交于 2019-12-21 17:31:30
问题 I struggled to converted SVG Files into PDF using JSPDF. Here i Worked in following code. var doc = new jsPDF(); var test = $.get('amChart.svg', function(svgText){ // console.log(svgText); var svgAsText = new XMLSerializer().serializeToString(svgText.documentElement); console.log(svgAsText); doc.addSVG(svgAsText, 20, 20, doc.internal.pageSize.width - 20*2) //console.log(doc); // Save the PDF doc.output('datauri'); }); I get this script from this SO Answer.Its results only blank PDF .When i

Multiple XMLs to PDF: best approach

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 12:33:01
问题 I have some XML files which are used to generate my webpages, however I need to be able to allow the user to select a number of pages then combine them into one PDF. This PDF needs to have different styling to the actual web page (the content is kept in XML files ;) ). p.s. the PDF must have table of contents... and will include images taken from the website. 回答1: You would use a library like iText or iTextSharp to build a PDF using your content. 回答2: Write an XSLT stylesheet which transforms

pdf.js failing on getDocument

霸气de小男生 提交于 2019-12-21 11:46:53
问题 browser: Chrome environment: grails app localhost I'm running a grails app on local host (which i know there's an issue with pdf.js and local file system) and instead of using a file: url which i know would fail i'm passing in a typed javascript array and it's still failing. To be correct it's not telling me anything but "Warning: Setting up fake worker." and then it does nothing. this.base64ToBinary = function(dataURI) { var BASE64_MARKER = ';base64,'; var base64Index = dataURI.indexOf

pdf.js failing on getDocument

房东的猫 提交于 2019-12-21 11:46:18
问题 browser: Chrome environment: grails app localhost I'm running a grails app on local host (which i know there's an issue with pdf.js and local file system) and instead of using a file: url which i know would fail i'm passing in a typed javascript array and it's still failing. To be correct it's not telling me anything but "Warning: Setting up fake worker." and then it does nothing. this.base64ToBinary = function(dataURI) { var BASE64_MARKER = ';base64,'; var base64Index = dataURI.indexOf