Hacker Newsnew | past | comments | ask | show | jobs | submit | cosmiciron's commentslogin

I'm not sure I understand what you are asking here. If it's some advanced feature, which is obviously out of my domain of expertise, you are welcome to participate and fork the project to implement it yourself.


AI helped me write the documentation because it does a better job than I ever could. I honestly wish I’d had AI to help me write my screenplay ten years ago.


Oh I guess I stand corrected. I sometimes wish AI wasn't a thing because any natural talent for writing has now been rendered almost meaningless.


I beg to differ. People equate good writing with the cosmetics, which AI excels at, but it’s the substance that truly matters.

I was an animation director, so I didn't do stunts. Sorry.


And that's precisely why I'm neither a blockbuster director nor a massively paid "chief scientist", LOL.

As for the strange sentences? Before the web turned everything into paperless, infinite scrolls, people actually cared deeply about printed materials. With that came the strict requirement for pagination rules, widows, orphans, and deterministic behavior for margins. In fact, one of my favorite pieces of tech was built exactly around solving the discrepancy between display and print: NeXTSTEP with its Display PostScript technology.

To answer your question about the subtle difference between a line and paragraph break: mathematically, they trigger completely different layout states in a typesetting engine. A line break (soft return) just wraps text to the next line while preserving the current block's alignment and justification math. A paragraph break (hard return) ends the semantic block entirely, triggering top/bottom margins, evaluating widow/orphan rules for the previous block, and resetting the layout cursor for the next.

I had to build an engine that deeply understands this difference because in the film industry, screenplays are still written in Courier with strictly measured spatial margins and peculiar contextual rules on how blocks of dialogue break across pages. So this tool is basically my homage to an era long gone...


This project started from exactly there too until I couldn't push react-pdf any further. The MORE/CONT'D feature required by screenplay was impossible to implement with react-pdf's black box so I had to write my own.


Exactly! That's someone speaking from experience, I can tell! :p And yes the tests are in there. And interestingly enough, because the engine emits its IR (in compressed JSON), I can use those as snapshots for the tests. They work better than relying on PDF or SVG outputs.


Thanks for the correction. I'm actually not familiar with Prince, so I really can't tell.

To be clear, VMPrint isn't meant to compete with established engines like that. It’s just a genuinely helpful tool I built from scratch for the specific tasks I needed to accomplish because I couldn't find an alternative.

Prince looks powerful, but I have a feeling it probably wouldn't have been the right fit for my use case anyway.


Prince starts at 2k. This is OSS


Weasyprint [0] is OSS and supports CSS Paged media. I’m not actually sure why you’d ever use something like this project (or headless chrome for that matter, maybe you need some automated login as well?) which doesn’t.

print-css.rock [1] has a good overview of available tools and their features.

[0]: https://github.com/Kozea/WeasyPrint

[1]: https://print-css.rocks/


Because CSS is exactly what I wanted to avoid. I just needed predictable pager layout, and I didn't want to wrestle with CSS. Besides, this thing's tiny size allows it to run in a serverless function on the Edge, and that can be useful sometimes.


Why use HTML if you want to avoid CSS? HTML default styles only?


Who said I used HTML? It was impossible to write screenplay/manuscript in HTML and receive industry compliant outputs when printed/converted to PDF.


Sounds like you need Scrivener. It outputs industry standard formats for all kinds of manuscripts.


Its UI is too complicated for my taste. Besides, its screenplay support isn't perfect.

And Weasyprint does not have browser dependencies either, which is great.

Fun fact: I had to write a routine administrative letter for my parents in another country, I asked Claude to do so in PDF form so I could email it to them they would print it and mail it. The way it did so was to write a Python program using Weasyprint to generate the PDF...


For a personal desktop license, it's $495.

If you need something specific for a hosted service and aren't able to pay the full license fee, I can attest from personal experience that Håkon Wium Lie is very friendly and can probably work something out with you.


What does price have to do with anything.


Thank you for the kind words. I hope it becomes a useful part of your toolkit. It certainly is for my need to generate screenplays.


As someone who has spent decades in the lucid dreaming community researching consciousness (and created the SSILD technique), I could give you a very long, highly philosophical answer about the nature of the self, LOL.

But in the context of this repository: 'I' is the carbon-based entity that designed the layout architecture and takes full responsibility for the bugs.


Good eye, you are right. A few others noticed this as well. It is a known trade off given the engine being pure JS and only 80K. The project is still at very early stage, and I'm definitely keeping my eyes open for solutions.


If it's known why show it off as if it works?


Why hide it?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: