pdf-generation

Symfony2 - PdfBundle not working

℡╲_俬逩灬. 提交于 2019-12-22 10:27:13
问题 Using Symfony2 and PdfBundle to generate dynamically PDF files, I don't get to generate the files indeed. Following documentation instructions, I have set up all the bundle thing: autoload.php: 'Ps' => __DIR__.'/../vendor/bundles', 'PHPPdf' => __DIR__.'/../vendor/PHPPdf/lib', 'Imagine' => array(__DIR__.'/../vendor/PHPPdf/lib', __DIR__.'/../vendor/PHPPdf/lib/vendor/Imagine/lib'), 'Zend' => __DIR__.'/../vendor/PHPPdf/lib/vendor/Zend/library', 'ZendPdf' => __DIR__.'/../vendor/PHPPdf/lib/vendor

Generate PDF file with Zend Framework 2 [closed]

≯℡__Kan透↙ 提交于 2019-12-22 09:39:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm started to learn ZF2 right now and notice that there's no "Zend_Pdf" or similar on zend framework 2... How can I create pdf on this version of the framework? Anyone knows a good tutorial? 回答1: Zend Framework 2 has moved many of the old Zend Framework libraries out of the main core and created modules instead

How to write content into pdf use iText?

与世无争的帅哥 提交于 2019-12-22 08:24:24
问题 Right now i use iText to generate a pdf automatically. And my problem is that when the content is really very large, i need to calculate the content's height and width, and then add new page... this is really very inconvinent. so I wonder whether or not there is a method like: Document.add("a very very large article"); and after this , it will auto generate a pdf file ???? Thanks in advance ! 回答1: The following creates a 9 page pdf without having to calculate height and width. import java.io

How to make a particular sub-string Bold while printing a string in Pdf using iText in java eclipse?

瘦欲@ 提交于 2019-12-22 08:16:36
问题 I am using iText in Java to convert a HTML to PDF. I want a particular paragraph which has some words as Bold and some as Bold+Underlined to be passed as a string to the Java code and to be converted to PDF using the iText library. I am unable to find a suitable method for this. How should I do this? 回答1: If you want to convert XHTML to PDF, you need iText + XML Worker. You can find a number of examples here: http://itextpdf.com/sandbox/xmlworker The most simple examples looks like this:

If it's possible to generate a PDF file from a UITableView?

与世无争的帅哥 提交于 2019-12-22 06:33:44
问题 My application has a tableview with custom cells(include textfield, label and button), I wanna generate a pdf file from the tableview. Bellow is the code(now assume the tableview's content is all visible): UIGraphicsBeginImageContext(self._tableView.bounds.size); UIGraphicsBeginPDFPageWithInfo(CGRectMake(0, 0, self._tableView.bounds.size.width, self._tableView.bounds.size.height), nil); // what's the code here? // [self._tableView drawInRect:]; UIGraphicsEndPDFContext(); I always generate an

Download generated PDF using node-html-pdf module

旧街凉风 提交于 2019-12-22 05:53:24
问题 I'm using node-html-pdf module to generating a PDF file from an ejs template I've created, which after it is generated, it gets saved on my server. Now this works perfectly, but what I really need is when I click a button, it generates the PDF and downloads the file, instead of saving it. Below you can see the code I have to generate and save the file: var html = null; ejs.renderFile('./templates/participants.ejs', {users: req.body.users, course: req.body.course, organization: req.body

Render embedded image in PDF using Flying-Saucer from html

流过昼夜 提交于 2019-12-22 04:40:57
问题 I have an xhtml document that I'm turning into a PDF using flyingsaucer. The xhtml has several tags that have a base64 encoded images inline. The source of the xhtml is dynamic so the structure of where the image tags are can vary. This is a sample of what the tag looks like: <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAagAAAEuCAYAAADbW4YFAAAgAElEQVR4Aex9CYBdRZ ... When I look at the html in a browser, the image appears correctly, however, the img element doesn't get rendered in

Porting creation of a PDF document from iOS to Mac OS X

人盡茶涼 提交于 2019-12-22 04:17:05
问题 I am porting my code from iPhone to Mac and I have no idea how I can do this in Mac. Here's my code that I am trying to convert and I know that there's no UIGraphic in Mac. Can someone point me to a guide or give me a quick hint? Thanks. NSString *newFilePath = @"path/to/your/newfile.pdf"; NSString *templatePath = @"path/to/your/template.pdf"; //create empty pdf file; UIGraphicsBeginPDFContextToFile(newFilePath, CGRectMake(0, 0, 792, 612), nil); CFURLRef url = CFURLCreateWithFileSystemPath

How to convert PDF version 1.5 to version 1.4 in PHP

限于喜欢 提交于 2019-12-22 03:33:12
问题 How to convert PDF version 1.5 to version 1.4 in PHP ? Can anyone point me in the right direction ? 回答1: I have a similar requirement, and found that Ghostscript can modify a PDF version. Documentation is here: http://ghostscript.com/doc/current/Use.htm However, I didn't find anything specific about the dCompatibilityLevel option in the documentation. Rather, I found this article that demonstrated its use: http://rohieb.wordpress.com/2012/06/09/use-ghostscript-to-convert-pdf-files/ Here is

Merging PDF files with PHP/FPDI

◇◆丶佛笑我妖孽 提交于 2019-12-21 21:40:43
问题 i am trying to merge two files using FPDI the error i get is:'TCPDF ERROR: File is encrypted!', however, the files are not encrypted, at least the files are printable, viewable etc and no password is required. i want to merge two files: http://www.nps.org.au/__data/cmi_pdfs/CMI7412.pdf http://www.nps.org.au/__data/cmi_pdfs/CMI6656.pdf after i copy the files to the server and store the file names in array ($files) that has the absolute file paths, my code is: if (count ($files) > 0 ) { $pdf =