pdf-generation

Footer on last page while pdf generation by flying saucer

狂风中的少年 提交于 2019-12-23 14:46:31
问题 I'm using flaying saucer java library. I'm trying to add footers to my generated pdf. The goal is to have the same footer on each page and different content on the last page. html> <head> <style type="text/css"> @page { size: 8.5in 11in; margin-bottom: 1in; @bottom-left { content: element(footer_one); } @bottom-right{ content: element(footer_two); } @bottom-center{ content: element(footer_rights); } } #footer_two {position: running(footer_two); } #footer_one {position: running(footer_one); }

Read PDF file in a new tab of same browser

不羁的心 提交于 2019-12-23 12:32:50
问题 In a HTML table I am showing a list of data containing pdf files. All the pdf file name are hyperlinks. When user clicks on that hyper link the pdf should open in a new tab. Basically on click of the hyperlink I am calling an JS function, which calls an method to the server side. In the server side scripting I have written the below code. wrapper = FileWrapper(file(file_name)) response = HttpResponse(wrapper, mimetype='application/pdf; charset=utf-8') response['Content-Disposition'] = 'inline

Play Framework 2 Render pdf

♀尐吖头ヾ 提交于 2019-12-23 12:14:43
问题 Is it possible to render pdf document with play framework 2? (There is a module that can render pdf for play 1.x. is there a way to render in play 2?) 回答1: If you're looking to render view templates as PDF documents, check out this module. 回答2: There is the apache fop plugin which create pdf out of fop files. The fop files are not the most intuitive files, but in the end I always found a way to format complex pdf the way I wanted it. To add the plug in to your play application add this to

Play Framework 2 Render pdf

时间秒杀一切 提交于 2019-12-23 12:13:12
问题 Is it possible to render pdf document with play framework 2? (There is a module that can render pdf for play 1.x. is there a way to render in play 2?) 回答1: If you're looking to render view templates as PDF documents, check out this module. 回答2: There is the apache fop plugin which create pdf out of fop files. The fop files are not the most intuitive files, but in the end I always found a way to format complex pdf the way I wanted it. To add the plug in to your play application add this to

Displaying POST AJAX Response in new window

血红的双手。 提交于 2019-12-23 10:48:06
问题 I send POST data through ajax using jQuery and it returns the binary data of a PDF file. I'd like to do something with this data. Either by providing a link to download, or opening it a new tab/window. I know sending a user to a website and using GET variables would be easier but there is a lot of data that gets sent through and it needs to be post. Is there a way I can take the data that I retrieve and let a user download / see it somehow? $("#export_pdf").click(function() { var data

PhantomJS script returning blank web page

人走茶凉 提交于 2019-12-23 08:35:59
问题 I'm using phantomJS to create PDFs in PHP via the shell ( shell_exec ). The script works fine on the production server, and also works fine if I plug the PhantomJS command directly into my terminal. But it does not work when I run the script in my local dev environment. I'm wondering if there's a permissions issue involved. I won't dive into the specifics of my local environment for now since I'm guessing this is a high-level issue... The command that is supposed to execute via shell_exec() :

how to globally replace font in a PDF

和自甴很熟 提交于 2019-12-23 08:07:10
问题 Is it possible, using Adobe Acrobat or another tool, to globally replace a font in a PDF? How can I do this? 回答1: Without seeing your particular file it is hard to say that this would definitely work. But, typically a font is defined like this: /Resources << /Font << /F13 1 0 R >> >> 1 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Helvetica >> endobj The font resource is then used as /F13 12 Tf wherever text is drawn with it. If you were to change the /BaseFont in the definition, it would

Converting TIFF to PDF via Windows command line [closed]

隐身守侯 提交于 2019-12-23 07:45:35
问题 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 2 years ago . I'm looking for a free way to create a large batch of tif files (10-20k) into PDF files, ideally with OCR too. It needs to be callable from the command line in windows. 回答1: You can use the XnView application. It's got command line too. Another alternative might be IrfanView. 回答2: You can try LibTiff.Net library

How can I do inline formatting (bold and underline) for PDF generated by Prawnto in Rails?

删除回忆录丶 提交于 2019-12-23 07:40:12
问题 I generate a PDF file using Prawn and the Prawnto plugin in my rails application. I create a standard form with a standard textarea, and submit that as the body of the PDF file. However, I need to be able to format words and sentences with: bold underline maybe different type sizes I want to be able to do it from within the textarea input box. Right now, because I use prawnto, I basically am genering a view which outputs what is in the textarea. But if I put, say, bold in the text area, it

Add annotation to PDF using plain C/C++ [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-23 06:46:00
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I am looking for a way to add a note to a PDF, only using plain C/C++ (without a third party library). How can I get this result? 回答1: Here is the PDF Reference Document Third Edition. PDF files are composed by