pdf-generation

Save Open XML as PDF

拜拜、爱过 提交于 2019-11-27 22:01:01
As part of an investigation into enterprise level server side document generation I have come across Open XML. For those that have used this, how successful were you? Would you recommend it? Can you save the OpenXML to PDF directly or would I need to make use of a 3rd party component? If a 3rd Party component is required, which one did you use and which one would you recommend? Thanks Gineer Dave Markle The nice thing about the Office OpenXML is that it's the language of Microsoft Office -- if you live your "office life" in Word and Excel (2007 and later), that's the format you want. Can you

Example PDF language code which helps to study the official PDF specification? [closed]

拟墨画扇 提交于 2019-11-27 21:45:33
I am trying to learn the PDF file format. To this end I downloaded Adobe's PDF specification file, which is huge. So to help me study the details of PDF, I want to follow its abstract explanations by looking in parallel at some real-world PDF files. For example, one idea was to create a PDF file (using LaTeX) which has only one page and as content even only one character, a . But when I open this PDF file in a hex editor (or in other tools that can show the internal PDF structure), there is a lot of binary or compressed content inside this PDF. For an example for what I see, look at the

ASP.NET MVC FileStreamResult, fileDownloadName is not used

拈花ヽ惹草 提交于 2019-11-27 21:43:26
问题 The following returns a PDF which the browser tries to directly display inline. This works correctly. However, if I try to download the file, the download name is not "myPDF.pdf", but instead the ID in the route (myapp/controller/PDFGenerator/ID). Is it possible to set the file download name to be "myPDF.pdf"? public FileStreamResult PDFGenerator(int id) { MemoryStream ms = GeneratePDF(id); byte[] file = ms.ToArray(); MemoryStream output = new MemoryStream(); output.Write(file, 0, file.Length

How to use the browser's (chrome/firefox) HTML/CSS/JS rendering engine to produce PDF?

假装没事ソ 提交于 2019-11-27 21:13:59
There are nice projects that generate pdf from html/css/js files http://wkhtmltopdf.org/ (open source) https://code.google.com/p/flying-saucer/ (open source) http://cssbox.sourceforge.net/ (not necessarily straight pdf generation) http://phantomjs.org/ (open source allows for pdf output) http://www.princexml.com/ (comercial but hands down the best one out there) https://thepdfapi.com/ a chrome modification to spit pdf from html from I want to programatically control chrome or firefox browser (because they both are cross platform) to make them load a web page, run the scripts and style the page

How to calculate the string width in iText?

点点圈 提交于 2019-11-27 21:12:56
I am using iText to write a PDF. In some cases, I need to sign the PDF with the SetVisibleSignature function. With this function, we need to designate the rectangle that we will write the content into. But it's hard for me to calculate how wide the string will be, so that I can set the rectangle before setting a signature on the PDF. How can I calculate the string width in iText? You can use BaseFont.getWidthPoint(String text, float fontSize) to get the width of the string in pt. Or put the string in a Chunk and do chunk.getWidthPoint() The accepted answer BaseFont.getWidthPoint , won't work

Combine PDFs c#

不打扰是莪最后的温柔 提交于 2019-11-27 20:54:51
问题 How can I combine multiple PDFs into one PDF without a 3rd party component? 回答1: I don't think you can. Opensource component PDFSharp has that functionality, and a nice source code sample on file combining 回答2: The .NET Framework does not contain the ability to modify/create PDFs. You need a 3rd party component to accomplish what you are looking for. 回答3: As others have said, there is nothing built in to do that task. Use iTextSharp with this example code. 回答4: AFAIK C# has no built-in

pdf as an email attachment in iOS device [closed]

六月ゝ 毕业季﹏ 提交于 2019-11-27 20:44:29
问题 I would like to attach pdf created as an email attachment. I used following tutorial to create pdf on iOS device. The downloaded pdf can be viewed at this path: /Users/”Username”/Library/Application Support/iPhone Simulator/”Your App Directory”. I have not tried running this on ios device but I need to attach it as an email. Link for tutorial is : http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/ Any suggestion. 回答1: Create a MFMailComposeViewController and call

Generation PDF from HTML (component for .NET) [closed]

非 Y 不嫁゛ 提交于 2019-11-27 20:16:32
Can you please point me to open source or a reasonably priced comercial product capable of generating PDF from HTML? We currently use ABCpdf in one of our more complex applications. It has served us well and is not very expensive at all. I like that fact that I can send it raw HTML text and it will render it to a PDF in memory or as a file so we use to generate PDFs on the fly and serve them up via the web without actually ever saving it disk ever. We have been using it for about 3 years and early on I had to use their support for a very odd issue that was very specific and the support was

What is the smallest possible valid PDF?

Deadly 提交于 2019-11-27 20:04:03
问题 Out of simple curiosity, having seen the smallest GIF, what is the smallest possible valid PDF file? 回答1: This is an interesting problem. Taking it by the book, you can start off with this: %PDF-1.0 1 0 obj<</Type/Catalog/Pages 2 0 R>>endobj 2 0 obj<</Type/Pages/Kids[3 0 R]/Count 1>>endobj 3 0 obj<</Type/Page/MediaBox[0 0 3 3]>>endobj xref 0 4 0000000000 65535 f 0000000010 00000 n 0000000053 00000 n 0000000102 00000 n trailer<</Size 4/Root 1 0 R>> startxref 149 %EOF which is 291 bytes of PDF

Is there any way to generate PDF file from a XML/HTML template in iOs

二次信任 提交于 2019-11-27 19:55:24
I am creating an iPad application, in that i have to use different PDF forms. I got some methods to generate PDF files through code using Quartz2D. But I have to write entire forms through code. I may have to update the PDF forms in future, so again I have to write the code. So I heard that there is a component called iTextSharp for .net pdf creation - is there something similar for iOS? So that I can use some XML templates to create the PDF files. Please help, thanks I do this in my app using the iOS print subsystem and the UIMarkupTextPrintFormatter. The trick is to write your own custom