pdf-generation

Python PDF library [closed]

懵懂的女人 提交于 2019-11-26 19:35:21
What Python PDF libraries are there? I need to make some PDF with many grids, and I'm looking for a library that allows to manage pages (multi-page). The library should calculate when the page is ended and then create the next page. Bryan The two that come to mind are: pyPdf2 PDFMiner Rob Cowie Reportlab . There is an open source version, and a paid version which adds the Report Markup Language (an alternative method of defining your document). I already have used Reportlab in one project. There is also http://appyframework.org/pod.html which takes a LibreOffice or OpenOffice document as

how to save DOMPDF generated content to file? [closed]

岁酱吖の 提交于 2019-11-26 19:22:20
问题 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 3 years ago . I am using Dompdf to create PDF file but I don't know why it doesn't save the created PDF to server. Any ideas? require_once("./pdf/dompdf_config.inc.php"); $html = '<html><body>'. '<p>Put your html here, or generate it with your favourite '. 'templating system.</p>'. '</body></html>'; $dompdf = new DOMPDF();

jsPDF can't get any styling to work

痞子三分冷 提交于 2019-11-26 18:53:25
I'm new to using jsPDF but and for the life of me I can't get any css to apply to this thing! I've tried inline, internal, and external all to no avail! I read in another SO post that since it's technically printing stuff to a file I need a print style sheet, and that didn't work either. I have a very basic page that I'm just trying to get any CSS to work with: JS: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script type="text/javascript" src="jspdf.js"></script> <script type="text/javascript" src="./libs/FileSaver.js/FileSaver.js"></script> <script type

Convert canvas to PDF

心不动则不痛 提交于 2019-11-26 18:28:06
Is it possible to directly convert canvas to pdf using JavaScript ( pdf.js or something like that)? Is there another possible way like canvas to img and then img to pdf? Can you give me an example? You can achieve this by utilizing the jsPDF library and the toDataURL function. I made a little demonstration: var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); // draw a blue cloud context.beginPath(); context.moveTo(170, 80); context.bezierCurveTo(130, 100, 130, 150, 230, 150); context.bezierCurveTo(250, 180, 320, 180, 340, 150); context.bezierCurveTo(420,

How to edit or write on existing PDF with Ruby?

人走茶凉 提交于 2019-11-26 18:17:33
问题 I have a couple of PDF template files with complex content and several blank regions/areas in them. I need to be able to write text in those blank regions and save the resulting PDFs in a folder. I googled for answers on this question quite intensively, but I didn't find definite answers. One of the better solutions is PDF::Toolkit, but it would require the purchase of Adobe Acrobat to add replaceable attributes to existing PDF documents. The PHP world is blessed with FPDI that can be used to

Export html to pdf in ASP.NET Core

ε祈祈猫儿з 提交于 2019-11-26 17:59:34
问题 I want to export a piece of html to a pdf file but i do not any compatible nuget package. When I try to install anyone: "X not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0)." Does anyone know any way to export to a pdf using asp.net core?? 回答1: You can use jsreport .net sdk if you are in .net core 2.0 also without more complex node services. This includes among other features filters to convert your existing razor views into pdf. From the docs: 1. Install nugets jsreport.Binary,

Creating page headers and footers using CSS for print

你离开我真会死。 提交于 2019-11-26 17:58:14
问题 I'm creating a PDF using Flying Saucer (which dumps out CSS/HTML to iText to a PDF) and I'm trying to use CSS3 to apply an image header and footer to each page. I'd essentially like to put this div in the top left of each page: <div id="pageHeader"> <img src="..." width="250" height="25"/> </div> My CSS looks somewhat like this: @page { size: 8.5in 11in; margin: 0.5in; @top-left { content: "Hello"; } } Is there a way for me to put this div in the content ? 回答1: Putting an element to the top

Generate PDF from Rails

十年热恋 提交于 2019-11-26 17:57:13
问题 The Ruby On Rails Wiki lists a couple of libraries that facilitate PDF generation in Rails . I need to print out address labels (in letter format, thus 12-15 addresses per page) and cannot decide which one to use. Any recommendations? 回答1: The best I've seen so far is Prawn: Prawn http://prawn.majesticseacreature.com/ http://advent2008.hackruby.com/past/2008/12/17/awn_and_the_future_of_ruby_pdf_generation/ http://railstips.org/2008/10/14/how-to-generate-pdfs-in-rails-with-prawn Prawn Rails

Best C# API to create PDF [closed]

拜拜、爱过 提交于 2019-11-26 17:20:27
Can you recomend any PDF API for C#. Free is the best, but i dont mind paying for it. Update: I'm not sure when or if the license changed for the iText# library , but it is licensed under AGPL which means it must be licensed if included with a closed-source product. The question does not (currently) require free or open-source libraries. One should always investigate the license type of any library used in a project. I have used iText# with success in .NET C# 3.5; it is a port of the open source Java library for PDF generation and it's free. There is a NuGet package available for iTextSharp

Converting HTML to PDF using PHP? [duplicate]

别说谁变了你拦得住时间么 提交于 2019-11-26 17:10:57
Possible Duplicate: Convert HTML + CSS to PDF with PHP? Is it possible to convert a HTML page to PDF using PHP, and if so, how can it be done? Specifically, the page is an invoice generated dynamically. So I would like it loaded using: http://example.com/invoices/3333 And the HTML output would have to be converted to PDF. Any good libraries that do this will be fine. Strae If you wish to create a pdf from php, pdflib will help you (as some others suggested). Else, if you want to convert an HTML page to PDF via PHP, you'll find a little trouble outta here.. For 3 years I've been trying to do it