Live data from Hacker News

Show HN: Gutenberg – Modern CSS framework to print the web correctly

github.com

11–20 of 62 posts

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#12
Where are word breaks (word splitting if not fit for page), justify alignment? Variable spaces between letters?

Is this possible with CSS? I'm trying to typeset a long text on the web and I'm not happy about how it looks compared to LaTeX and PDF. (it's straight out awful)

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#13
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

I don't think this is CSS3, it has been arround for ages ( you will be using this when convert html pages to pdf also ;) )

I recall using those in 2002 or somewhere around that time. :)

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#14
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

The problem with those, the last time i checked, was that most html to pdf solutions don't support them. The only one I could find was Prince ( https://www.princexml.com/ ) , which is commercial and rather pricey.

I'm pretty sure that wkhtmltopdf supported these too, last time I used it, though it's been quite a while now.

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#15

Where are word breaks (word splitting if not fit for page), justify alignment? Variable spaces between letters? Is this possible with CSS? I'm trying to typeset a long text on the web and I'm not happy about how it looks compared to LaTeX and PDF. (it's straight out awful)

The CSS text module has some support for various text manipulations (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Text) but it's obviously not quite as extensive as LaTeX or InDesign or whatever.

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#16
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

I don't think this is CSS3, it has been arround for ages ( you will be using this when convert html pages to pdf also ;) )

And yet almost every time I try to print a page, it thinks it's ok to just split an image over two pages. It baffles me that this is the default.

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#17
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

The problem with those, the last time i checked, was that most html to pdf solutions don't support them. The only one I could find was Prince ( https://www.princexml.com/ ) , which is commercial and rather pricey.

dompdf supports this.

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#18
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

The problem with those, the last time i checked, was that most html to pdf solutions don't support them. The only one I could find was Prince ( https://www.princexml.com/ ) , which is commercial and rather pricey.

PhantomJS supports it too (either through `html-pdf` or manually).

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#19
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

There's a lot of nice things you can do in CSS for printing. I worked on a project to make web articles printable. The last version focused more on doing the printing via the browser using CSS for creating columns. Here's a video demo: https://www.youtube.com/watch?v=854Csokl3QA and some notes in our blog: http://blog.fivefilters.org/post/75603097111/pdf-newspaper-2...

The software itself is free to try at http://fivefilters.org/pdf-newspaper/

Re: Show HN: Gutenberg – Modern CSS framework to print the web correctly

#20
post #4

Wow, today I learned (via this) about: page-break-before: page-break-after: Did not know these were in CSS3 ! It's always worth poking around in others peoples code...

The problem with those, the last time i checked, was that most html to pdf solutions don't support them. The only one I could find was Prince ( https://www.princexml.com/ ) , which is commercial and rather pricey.

Checkout https://docraptor.com/ - it's great - is commercial but affordable.
Post reply on HN