pdf-generation

ImageMagick/Imagick convert PDF to JPG using native PHP API

懵懂的女人 提交于 2019-11-28 18:55:12
I’m attempting to convert PDF files into PNGs. It works great from the command line (I do have GhostScript 8.64 installed). But from PHP I’m having a problem: code: $im = new Imagick($pdf_file); // this is where it throws the exception below output: Fatal error: Uncaught exception ‘ImagickException’ with message ‘Postscript delegate failed `23_1235606503.pdf’: No such file or directory @ pdf.c/ReadPDFImage/612′ in get_thumbnail.php:93 Stack trace: \#0 get_thumbnail.php(93): Imagick->__construct(’…’) etc. etc. I'm not sure what I'm doing wrong here, but I suspect it has something to do with my

Replace all font glyphs in a PDF by converting them to outline shapes

不想你离开。 提交于 2019-11-28 18:52:12
I am looking for a way to 'outline' all text/fonts in a PDF file, i.e. convert them to curves. I would prefer to do this without having to convert the PDF to PostScript and back. Also, I would like to use free lightweight cross-platform tools that can be automated from the command line, such as Ghostscript or MuPDF. Yes, you can use Ghostscript to achieve what you want. I. For Ghostscript versions up to 9.14 You need to go through 2 steps: Convert the PDF to a PostScript file, but use the side effect of a relatively unknown parameter: it is called -dNOCACHE . This will convert all used fonts

Show PDF in iPad using CGPDF APIs [closed]

心已入冬 提交于 2019-11-28 18:27:38
I have learned Apple has release CGPDF APIs in SDK 3.2 for drawing PDF context. What I understand from these APIs is that you can draw a PDF to a data object or a PDF file. You can then export it, may be, to your sandbox's directory OR add as an attachment in the mail. But I am not sure if we can use these APIs to read a PDF from application bundle and show it to the user page-by-page on the screen. What I want to do is open a PDF of a magazine in a magazine reader app. I was also wondering if we can identify the links in a PDF file and open them in the app. Let me know if have done OR doing

Generating a PDF using the new printing stuff in iOS 4.2

删除回忆录丶 提交于 2019-11-28 17:40:32
Historically, my app has generated confirmations as plain HTML and passed that HTML to the normal MFMailComposeViewController for emailing to the customer. I wanted to try to leverage the new printing classes in iOS 4.2 to render the HTML to a PDF instead and send that as an attachment. I tried the following: NSString *html = /* generate my HTML here */ NSMutableData *pdfData = [NSMutableData data]; UIMarkupTextPrintFormatter *fmt = [[UIMarkupTextPrintFormatter alloc] initWithMarkupText:html]; // Render the html into a PDF UIGraphicsBeginPDFContextToData( pdfData, CGRectZero, nil ); for

How to edit a pdf in the browser and save it to the server

寵の児 提交于 2019-11-28 17:38:17
Here are the requirements, the users needs to be able to view uploaded PDFs in the browser. They need to be able to add notes to the PDF and save the updated PDF to the server without having to save it to their machine and open it outside the browser. Any ideas on how to achieve this are welcomed. by the way I am working with an asp.net website (in C#). I have no control over what the pdf looks like. It is uploaded client-side then other users need to view and an notes on top of the pdf. The solution that I was thinking is to render the PDF to a jpeg and use javascript to plot coordinates of

Converting MS Word Documents to PDF in ASP.NET [closed]

回眸只為那壹抹淺笑 提交于 2019-11-28 17:36:28
Similar questions have been asked, but nothing exactly like mine, so here goes. We have a collection of Microsoft Word documents on an ASP.NET web server with merge fields whose values are filled in as a result of user form submissions. After the field merge, the server must convert the document to PDF and stream it down to the browser. Our first inclination was to use the Visual Studio Tools for Office API; however, we ran into this warning from Microsoft : Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non

How best to write documentation targeting both HTML and PDF? [closed]

你说的曾经没有我的故事 提交于 2019-11-28 17:35:34
Latex-to-html converters I've seen in the past have been pretty awful. Editing raw html is no fun and doesn't seem to translate well to the printed page. How do others solve this problem? Links to examples (both pdf and html) would be great. Added: Another similar question was just asked: What formatting language should I use for project documentation For documenting code, I also recommend Sphinx. ReStructured Text is nice because it is readable and somewhat marked up in plaintext, and can do a nice job converting to html and to pdf. I still like LaTeX for certain things. My wife and I use

Custom Fonts for DOMPDF

纵然是瞬间 提交于 2019-11-28 17:32:52
问题 I'm Using DOM PDF 0.6.0 Beta 2. I want to use custom fonts (Fonts: 'Segeo Print', 'Lucida Handwriting','Airplanes in the Night Sky') in PDF file. I followed the guidelines to install and use fonts in my PHP Code, which is given here http://code.google.com/p/dompdf/wiki/CPDFUnicode But I'm not able to get desire fonts in my PDF. You can find my code in this post. Please Let me know how I can resolve this issue. <?php require_once("dompdf_config.inc.php"); $html = "<html> <head> <meta http

Are there any Java PDF creation alternatives to iText? [closed]

老子叫甜甜 提交于 2019-11-28 17:29:27
I am trying to render about 100,000 - 80 column records through FOP and it tanks pretty much everytime (OutOfMemoryException). I know iText could handle that kind of load but I can't use it because of the LGPL license. Are there any alternative Java libraries to iText that can handle rendering a high volume of data to PDF? Yishai There are commercial PDF generating libraries, such as BFO and ElegantJ . If you need open source, there is PDFBox , but I don't know if it is production ready. Have a look at RenderX for an alternative to FOP. It costs money, but if you have an existing solution in

dompdf Page break if element is exceeding page height?

帅比萌擦擦* 提交于 2019-11-28 17:25:24
问题 What is the best way to do page breaks in dompdf? I have had a look here at the page-break-before css attribute, but it didn't work when I did: table {page-break-before:auto;} The page still breaks in the middle of my table. Is it possible to setup my html/css so that the page will break before the element if the element is going to exceed the page height? Ideally I would like to divide my html up in to div sections so that each section will start on a new page if it is going to exceed the