News for hackers. Stuff that matters.

kelvinzhang

The sync was so seamless I didn't even realize it was playing from my own device at first
Re:Show HN: Htmldocs – Typeset and generate pdfs with React on Tuesday February 18, 2025 @08:47AM (#43089410)
After a year since v1, I’m open-sourcing htmldocs, a React-based library for building PDF documents using modern web development tools. Write document templates in JSX, style with Tailwind, and render them to pixel-perfect PDFs with a Chromium pipeline—no more LaTeX headaches or Word/Google Docs limitations.

I originally built this because I needed a better way to generate invoices and tailor resumes to job descriptions dynamically. Existing solutions had major trade-offs:

- Google Docs/Word → Easy but lack APIs & version control

- LaTeX → Structured output but painful syntax & no API

- Figma → Flexible but not designed for automation

With htmldocs, you can:

- Define document templates and props in JSX (just like web components)

- Use modern CSS (flexbox, grid, Tailwind, etc.)

- Render server-side via a headless Chromium pipeline

- Upload templates for remote PDF generation via an API

Most of the world still runs on PDFs—contracts, reports, invoices, resumes, etc. It’s time we had a developer-first approach to document generation, just like we build for the web.

What frustrations have you had with existing document solutions? Would love to hear your ideas, experiences, and feedback.

Show HN: Eztranscribe – Dead simple web UI for OpenAI Whisper

https://eztranscribe.com/

Was trying to transcribe some podcasts this holiday season and was tired of navigating through all the SEO blog posts and paywalls. So I decided to build a simple wrapper around OpenAI's Whisper that just gets the job done.Using my own API key for now so pls don't bankrupt me :)

( Read More... | no comments | 2 points | on HN )
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @11:27PM (#39037848)
Offline isn’t a priority at the moment but can be done in the future by packaging with Electron.

Typst is great but there are a few key differences:

- full CSS support, allowing for more customizability and familiar styling without a learning curve

- less tailored towards academic use-cases are more towards personal/business use-cases like resumes, invoices, reports. Also adding a template gallery in the near future.

- has a templating engine and API baked in

- can use JS packages and ecosystem (ex. icon sets, fonts, etc.)

Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @11:18PM (#39037776)
The long term goal of this project is to make HTML/CSS the defacto way of typesetting PDF documents. I’ll definitely keep it running for as long as I can.

The web version is just the initial step, and will likely open source for people who want to self-host and to increase adoption. For pricing, will probably adopt a model similar to Overleaf where it’s free for most users and maybe charge for team collaboration or have an enterprise license.

Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @12:27PM (#39030690)
Fixed! Sorry about that
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @12:22PM (#39030625)
I think in the long term, HTML/CSS will win out once there's better support for CSS Paged Module Level 3, and you'll be able to achieve that requirement with just

    @page :left {
        margin-left: 20mm;
        margin-right: 10mm;
    }
    
    @page :right {
        margin-left: 10mm;
        margin-right: 20mm;
    }

instead of needing to install/import different LaTeX packages. I think for most of my current use-cases level 2 has been sufficient but I can see if I can include Paged.js polyfill support by default so there's more support for customizability on that front.
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @12:10PM (#39030472)
Pricing info is in a modal under the user dropdown, it's currently based on a monthly credit system. If there's another pricing model you'd prefer, let me know!
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @10:46AM (#39029285)
You can probably get away with Pandoc depending on your use-case, this is primarily built for:

- having a web editor interface without needing to re-run a CLI command

- people who don't want to deal with packages/dependencies on their own system

- users that just want an affordable and easy-to-use API to generate PDF documents instead of having to set up their own server <> task queue <> worker system which would usually cost more

- in the future, teams that want to collaborate together on a document

Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @10:30AM (#39029052)
I think it should be on the <ul> tag. See https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_li...
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @10:24AM (#39028947)
This is a great suggestion and I feel dumb for not thinking of this earlier. Thanks!
Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @10:12AM (#39028779)
Nice catch, I copy/pasted that from a previous project and forgot to remove - should be fixed now.

TOS is pretty general and just there for legal reasons, tl;dr feel free to use as you see fit as long as it's not for anything illegal.

Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @10:03AM (#39028644)
We actually ran off of WeasyPrint at first but switched to Chromium due to emojis not rendering properly, poor flexbox support, no custom fonts, and other differences between the HTML you'd see in a browser vs. the generated PDF.

WeasyPrint implements its own rendering engine and might support some specific @page properties that Chromium does not but given the complexity of CSS and web browsers, you're generally better off sticking with Chromium due to its history.

Also – an added benefit is that we can use JS libraries like FontAwesome, Bootstrap, KaTeX, etc. which is where other HTML to PDF libraries fall flat.

Re:Show HN: htmldocs - Typeset and Generate PDFs with HTML/CSS on Wednesday January 17, 2024 @08:44AM (#39027544)
htmldocs is an Overleaf-style editor for typesetting documents using HTML/CSS, which provides the same benefits as LaTeX while being more accessible, customizable, and familiar.

I built this because I wanted to programatically generate invoices as well as automatically tailor my resume to jobs but had no good way of generating well-formatted PDFs. I ended up building a templating engine to Chromium rendering pipeline to generate PDFs, and due to the amount of engineering effort, turned it into a tool for others that might want to do the same. There's a built-in API (https://htmldocs.com/docs/documents) that you can call to turn JSON into PDFs in a single call.

htmldocs is different from other tools like Wkhtmltopdf and Weasyprint in that it uses Chromium to generate PDFs, meaning that it supports the most modern CSS features and there's minimal drift between the rendered HTML document and PDF.

Will also consider open sourcing if there's enough interest in the project!

We definitely need more ways to build quick web UIs for Python code. Looks sick!
Love the idea of an open source Retool. Excited to try it out
Re:Launch HN: Scena360.com – Immersive gathering platform on Friday January 29, 2021 @07:32PM (#25964712)
Congrats on the launch! Super cool stuff
Hey, I'm one of the engineers behind Dropbase. Currently all imported data needs to be structured, which means that the data needs to be formatted in either values, records, index, or column orientations (see https://pandas.pydata.org/pandas-docs/stable/reference/api/p...). Right now we can only auto-detect between those formats, but in the future we're looking to accept unstructured data as well.
Re:Show HN: COVID Inc. on Thursday March 26, 2020 @03:45PM (#22697169)
Hi, the dots are currently generated on a per capita basis, although it not be as visible since we use a log scale. We're working on adding per capita tooltips though!
Re:Show HN: COVID Inc. on Thursday March 26, 2020 @03:43PM (#22697148)
Hey there! For the map to display properly your device needs to be in landscape mode; if you're using the site on a phone, please make sure "auto rotate device" is turned on and try again. Sorry about that :)