Ruby pdfkit documentation8/12/2023 Lakshan: PDFKit seems to do "inline" PDF generation. However, it's still a PITA to generate PDFs for email attachments (within ActionMailer) with WickedPDF or Prawn. Isn't PDFKit more or less similar to WickedPDF ( ), which is also based on wkhtmltopdf? I've been using it in apps since last year and wonder what the big deal with PDFKit? I just generate an XML file and then do the rest of the work there. I've been working on creating a PDF creation library using iText and Radius (for a markup). Update: Some readers note that PDFKit seems rather similar to wicked_pdf, a similar library that has been around for about a year now. RGhost is more similar to Prawn than PDFKit, but has some interesting features, such as being able to easily render documents into formats other than PDF (such as PostScript, PNG, TIFF, and JPEG). In rebutting PDFKit, Greg suggests RGhost - Ruby GhostScript as another Ruby PDF generator alternative. I think there's room for more than one approach, depending on what you want to achieve. Nonetheless, if a HTML driven approach feels better to you and would give "good enough" results, PDFKit is worth a try and the results look OK. Given the "Prawn is a bit meh" tone of Jared's article, though, Gregory Brown is not impressed and points out that Prawn gives you stronger and more precise under-the-hood control, useful particularly for building complex forms, tables and doing point-perfect positioning of on-page elements. To do this, he and some colleagues built PDFKit, a Ruby HTML-to-PDF library powered by wkhtmltopdf. He expresses a preference for converting HTML and CSS documents to PDF, rather than using the more PDF-level conventions Prawn adopts. In Rethinking PDF Creation in Ruby, Jared takes a playful swipe at Gregory Brown's much loved Prawn PDF generation library. Coming from HTML+CSS-based layouts, writing Ruby code for that stuff is a major pain. If you've ever generated PDFs in Ruby before, you know that it can be both tedious and difficult using the standard go-to PDF libraries out there.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |