pdf-generation

Save multiple sheets to .pdf

可紊 提交于 2019-11-26 03:36:00
问题 I have a reporting spreadsheet that grabs some data from a database and forms three sheets of summary report information. I want to run the spreadsheet automatically from the command line, and have it automatically save all three reporting sheets as a PDF file(s). At first I thought I could have a VBA macro on the sheet do this by a series of \"print as PDF\", but that requires an intermediary interactive dialog box to specify the output file name. Then I find that I can just save as pdf, and

iOS SDK - Programmatically generate a PDF file

徘徊边缘 提交于 2019-11-26 02:42:36
问题 Using the CoreGraphics framework is tedious work, in my honest opinion, when it comes to programmatically drawing a PDF file. I would like to programmatically create a PDF , using various objects from views throughout my app. I am interested to know if there are any good PDF tutorials around for the iOS SDK, maybe a drop in library. I\'ve seen this tutorial, PDF Creation Tutorial, but it was mostly written in C. Looking for more Objective-C style. This also seems like a ridiculous way to

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

How to generate multiple lines in PDF using Apache pdfbox

风流意气都作罢 提交于 2019-11-26 02:35:02
问题 I am using Pdfbox to generate PDF files using Java. The problem is that when i add long text contents in the document, it is not displayed properly. Only a part of it is displayed. That too in a single line. I want text to be in multiple lines. My code is given below: PDPageContentStream pdfContent=new PDPageContentStream(pdfDocument, pdfPage, true, true); pdfContent.beginText(); pdfContent.setFont(pdfFont, 11); pdfContent.moveTextPositionByAmount(30,750); pdfContent.drawString(\"I am trying

Which one is the best PDF-API for PHP? [closed]

ⅰ亾dé卋堺 提交于 2019-11-26 02:16:25
问题 Which one of these is the best PDF-API for PHP? ApacheFOP dompdf FPDF html2ps mPDF PDFlib TCPDF wkhtmltopdf Zend_Pdf 回答1: personally i'd rather go with tcpdf which is an ehnanced and mantained version of fpdf. 回答2: From the mpdf site: "mPDF is a PHP class which generates PDF files from UTF-8 encoded HTML. It is based on FPDF and HTML2FPDF, with a number of enhancements." mpdf is superior to FPDF for language handling and UTF-8 support. For CJK support it not only supports font embedding, but

Convert Word doc, docx and Excel xls, xlsx to PDF with PHP

依然范特西╮ 提交于 2019-11-26 01:15:28
问题 I am looking for a way to convert Word and Excel files to PDF using PHP. The reason for this, is I need to be able to combine files of various formats into one document. I know that if I am able to convert everything to PDF I can then merge the PDFs into one file using PDFMerger (which uses fpdf). I am already able to create PDFs from other file types / images, but am stuck with Word Docs. (I think I would possibly be able to convert the Excel files using the PHPExcel library that I already

How to convert HTML to PDF using iTextSharp

淺唱寂寞╮ 提交于 2019-11-25 23:03:39
问题 I want to convert the below HTML to PDF using iTextSharp but don\'t know where to start: <style> .headline{font-size:200%} </style> <p> This <em>is </em> <span class=\"headline\" style=\"text-decoration: underline;\">some</span> <strong>sample<em> text</em></strong> <span style=\"color: red;\">!!!</span> </p> 回答1: First, HTML and PDF are not related although they were created around the same time. HTML is intended to convey higher level information such as paragraphs and tables. Although

Converting HTML to PDF using iText

夙愿已清 提交于 2019-11-25 22:58:35
问题 I am posting this question because many developers ask more or less the same question in different forms. I will answer this question myself (I am the Founder/CTO of iText Group), so that it can be a \"Wiki-answer.\" If the Stack Overflow \"documentation\" feature still existed, this would have been a good candidate for a documentation topic. The source file: I am trying to convert the following HTML file to PDF: <html> <head> <title>Colossal (movie)</title> <style> .poster { width: 120px

Convert HTML + CSS to PDF with PHP? [closed]

与世无争的帅哥 提交于 2019-11-25 22:54:18
问题 I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7. It uses fairly basic CSS to style it and renders fine in HTML. I\'m now after a way of converting it to PDF. I have tried: DOMPDF: it had huge problems with tables. I factored out my large nested tables and it helped (before it was just consuming up to 128M of memory then dying--thats my limit on memory in php.ini) but it makes a complete mess of tables and doesn\'t seem to get images. The tables were just basic

Generating PDF files with JavaScript

三世轮回 提交于 2019-11-25 22:49:01
问题 I’m trying to convert XML data into PDF files from a web page and I was hoping I could do this entirely within JavaScript. I need to be able to draw text, images and simple shapes. I would love to be able to do this entirely in the browser. 回答1: I've just written a library called jsPDF which generates PDFs using Javascript alone. It's still very young, and I'll be adding features and bug fixes soon. Also got a few ideas for workarounds in browsers that do not support Data URIs. It's licensed