Prawn
taffy
Prawn | taffy | |
---|---|---|
10 | 36 | |
4,605 | 1,807 | |
0.3% | 4.6% | |
7.8 | 8.5 | |
4 days ago | 17 days ago | |
Ruby | Rust | |
CERN Open Hardware Licence Version 2 - Strongly Reciprocal | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Prawn
-
Show HN: Dropflow, a CSS layout engine for node or <canvas>
I'm a little confused by your comment. I've been using the Prawn library to generate PDFs on the backend for a side project I am working on for quite sometime https://github.com/prawnpdf/prawn
(Admittedly, the PDFs I generate are most certainly not beautiful, so maybe that's the difference)
-
Working with PDFs in Ruby
to view the email preview (note the PDF attachment included in the email): ![Email preview with attachment](https://www.honeybadger.io/images/blog/posts/ruby-pdfs/email-preview.png) ## Prawn PDF [Prawn PDF](https://github.com/prawnpdf/prawn) is a pure Ruby PDF- generation library that comes packed with features, such as PNG and JPG image embeds, generated file encryption, right-to-left text rendering, a way to incorporate outlines for easy document navigation, and a lot more. Prawn comes with its own DSL, which drives its powerful PDF generation abilities. ### When to Use Prawn Although it's not a fully featured report generation library like the well-known [Jasper Reports](https://community.jaspersoft.com/), with a bit of work using it's powerful DSL, you can generate some really cool and rather complex PDF documents with Prawn. Even so, it's important to note that Prawn isn't everything. If you want to generate PDFs from HTML, then you should look elsewhere, as the gem provides very limited support for inline styling, something of a hurdle if you're working with rich HTML documents. ### Installing and Using Prawn To get started with Prawn, install it with this command: ```bash gem install prawn
-
Need help
Is the Prawn gem something you can utilize?
-
Invoicing gem implementation
Prawn pdf: https://github.com/prawnpdf/prawn
-
Working on Script to auto-generate templates, help needed
Javascript isn't really my thing, so first I had a go with the Prawn library in ruby, but now I'm hacking LuaTex via Fennel and having a blast.
-
Creating PDFs in a Ruby on Rails application
You have a few options when trying to create a PDF in a Rails environment. Prawn and Wicked PDF have been around for quite a while. I have been using both gems and they work fine. However, they have a few limitations that can make it difficult to handle more complex PDFs. I recently discovered Grover, which can remediate some of this inflexibility in creating PDFs.
-
What libraries do you miss from other languages?
On this note, Ruby’s Prawn is great at the writing half and I miss it in pretty much every other language.
- Status Update 2021 (Prawn PDF Ruby Gem)
- Status Update 2021 (PrawnPDF OSS)
-
2021 PDF planner template for goodnotes etc. (Sadly the last one)
are you using keynote to make the file and then export to pdf? I wonder if it could be possible to do this programatically, using ruby and prawn (https://github.com/prawnpdf/prawn) 🤔. I have zero time to try it today, but this could be a fun weekend project for sure.
taffy
-
Show HN: Dropflow, a CSS layout engine for node or <canvas>
I maintain a standalone web layout engine[0] (currently implementing Flexbox and CSS Grid) which has no scripting support. WPT layout tests using is a major blocker to us running WPT tests against our library. Yoga (used by React Native) is in a similar position.<p>Do you think the WPT would accept pull requests replacing such tests with equivalent tests that don't use <script> (perhaps using a build script to generate multiple tests instead - or simply writing out the tests longhand)?<p>I could run against only the ref-tests, but if I can't get full coverage then the WPT seems to provide little value over our own test suite.<p>[0]: <a href="https://github.com/DioxusLabs/taffy">https://github.com/DioxusLabs/taffy</a>
-
CSS for Printing to Paper
> Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?
Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo. You do effectively get a whole browser though.
I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months
Neither of these setups currently have any support for pagination though.
-
I'm fed up with it, so I'm writing a browser
I maintain a web layout library that is designed to be integrated into other software:
https://github.com/DioxusLabs/taffy
It needs to be combined with a text layout engine (such as https://github.com/pop-os/cosmic-text), and it doesn't support everything yet (notable features that are currently missing: "float", "display: inline-block", "box-sizing: content-box", "position: static"). But we have Block, Flexbox and CSS Grid support with more on the way.
-
Looking for this. html + css rendering through wgpu.
All of these projects have in common that they use Taffy (the project that I work on!) for box-level layout (which currently gives them block, flexbox, and grid layout) , and are either using or planning to use cosmic-text for text/inline layout. This gives you a decent first approximation of web layout, but it's not perfect and there are major features like float, display: inline-block, position: static, box-sizing: content-box missing. Not to mention that none of these implementations currently resolve CSS selectors, so you are effectively limited to inline styles (if you're interested in something in that direction then you may be interested in https://github.com/vizia/vizia).
-
Show HN: Slint - A Declarative UI Toolkit Written in Rust for Embedded & Desktop
While there are a lot of Rust UI frameworks, none of them are really recommended for production use yet. I suspect a few of the will die off and work will coalesce a few once things mature a bit.
Another nice feature of the Rust UI ecosystem is that lots of it is being built in a modular way. For example I maintain a layout engine [0] library which just does layout and can be easily integrated by anybody creating a UI library. And there a bunch of similar composable libraries covering rendering, text layout, accessibility, window creation, clipboard access, etc.
[0]: https://github.com/DioxusLabs/taffy
-
Conflict-Driven Synthesis for Layout Engines
You might be interested in the combination of Taffy [0] which handles box-level browser layout (block, flexbox, grid, etc) and Cosmic Text [1] which handles text-level layout and basic text editing functionality.
Integrating them into browsers while retaining accessibility could be tricky. But in they're general they're relatively small standalone libraries implementing most of the layout algorithms that browsers implement (although there are currently a few key missing features like laying out "inline-block" items in line with text).
[0]: https://github.com/DioxusLabs/taffy
[1]: https://github.com/pop-os/cosmic-text
-
Ink: React for interactive command-line apps
I maintain a library (https://github.com/DioxusLabs/taffy) that implements both Flexbox and CSS Grid, and is designed to be easily embedded (similar to Yoga, which Ink is using).
-
[Media] Version 0.3 of Inlyne - An interactive markdown renderer written entirely in Rust
https://github.com/DioxusLabs/taffy (disclaimer: I work on this crate) which does CSS layout given CSS styles. This would probably be much more useful once we merge support for display: block (https://github.com/DioxusLabs/taffy/pull/474), and if in the future we support display: table. Taffy doesn't handle text layout but is designed to integrate nicely with external layout systems.
-
Project idea: port markdownlint to Rust
Ok, "1.4GB" made me look into this more. I hadn't realised that we were using a "superlinter" action that includes linters for over 10 languages. Switching to a different github action brought to time down to 3 seconds! https://github.com/DioxusLabs/taffy/pull/463
- GitHub Accelerator: our first cohort and what's next
What are some alternatives?
Wicked Pdf - PDF generator (from HTML) plugin for Ruby on Rails
dioxus - Fullstack GUI library for web, desktop, mobile, and more.
HexaPDF - Versatile PDF creation and manipulation for Ruby
stretch - High performance flexbox implementation written in rust
Pdfkit - A Ruby gem to transform HTML + CSS into PDFs using the command-line utility wkhtmltopdf
mirrord - Connect your local process and your cloud environment, and run local code in cloud conditions.
Grover - A Ruby gem to transform HTML into PDFs, PNGs or JPEGs using Google Puppeteer/Chromium
pomsky - A new, portable, regular expression language
CombinePDF - A Pure ruby library to merge PDF files, number pages and maybe more...
yoga - Yoga is an embeddable layout engine targeting web standards.
Squid - A Ruby library to plot charts in PDF files
pypandoc - Thin wrapper for "pandoc" (MIT)