News for hackers. Stuff that matters.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by Jaruzel on Thursday March 02, 2017 @04:38AM (#13772849)
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...

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by Roritharr on Thursday March 02, 2017 @04:57AM (#13772923)
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.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by matthewmacleod on Thursday March 02, 2017 @05:41AM (#13773100)
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 we... by boundlessdreamz on Thursday March 02, 2017 @11:13AM (#13775174)
Printfriendly PDF API supports it. https://www.printfriendly.com/api
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by addedlovely on Thursday March 02, 2017 @06:22AM (#13773294)
Checkout https://docraptor.com/ - it's great - is commercial but affordable.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by Alex3917 on Thursday March 02, 2017 @07:58AM (#13773686)
Docraptor is just the SaaS version of PrinceXML, the underlying software is the same. Much more affordable for small jobs though!
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by jamespaden on Friday March 03, 2017 @07:44AM (#13782466)
DocRaptor is based on PrinceXML, but also includes a much more advanced JavaScript engine
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by TimMeade on Thursday March 02, 2017 @06:33AM (#13773343)
This looks interesting. Thanks, we are going to try it out.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by Globz on Thursday March 02, 2017 @11:29AM (#13775347)
I am using wkhtmltopdf for turning HTML orders to PDF for my company, I have no page break problems and printing is working like charm.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by haar on Thursday March 02, 2017 @05:56AM (#13773171)
PhantomJS supports it too (either through `html-pdf` or manually).
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by Roritharr on Thursday March 02, 2017 @06:22AM (#13773295)
I was looking into PhantomJS, this must be added since then. Great!
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by coldtea on Thursday March 02, 2017 @06:34AM (#13773348)
webkittopdf supported them just fine. And so does phantomjs when printing pdfs IIRC.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by criddell on Thursday March 02, 2017 @10:59AM (#13775018)
It's too bad webkittopdf is macOS only.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by coldtea on Thursday March 02, 2017 @02:53PM (#13777593)
Webkittopdf (or however it's called) is cross platform, based on the Qt port of Webkit.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by edoceo on Thursday March 02, 2017 @12:29PM (#13776058)
There is a wkhtml thing on Linux, but I use Phantom for this
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by hermiti on Thursday March 02, 2017 @01:37PM (#13776838)
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by dom96 on Thursday March 02, 2017 @08:06AM (#13773726)
weasyprint supports it
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by JoelSanchez on Thursday March 02, 2017 @05:54AM (#13773163)
dompdf supports this.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by _phazor on Thursday March 02, 2017 @05:17AM (#13773018)
What about Chrome? File -> Print -> Save as PDF. Works fine with these print properties as far as I can tell.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by k1m on Thursday March 02, 2017 @06:06AM (#13773218)
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 we... by qznc on Thursday March 02, 2017 @07:18AM (#13773509)
Columns are tricky.

Once I tried to convert a paper in ACM style into HTML [0]. It seems to work today. A few years ago, Chrome broke columns in printing mode.

What I still cannot do is the copyright notice, which for ACM style must be at the bottom of the first column (see example [1]). This would require something like absolute positioning relative to a printed page.

[0] http://pp.ipd.kit.edu/~zwinkau/acm_html/test.html [1] http://pp.ipd.kit.edu/uploads/publikationen/buchwald10cases....

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by k1m on Thursday March 02, 2017 @09:17AM (#13774098)
I didn't find a way to fix something at the bottom of each printed page with CSS either. Not sure if there's a solution today. I looked into it last in 2014.

And yes, Chrome had removed multi-column printing. It's supported again now. There's a bug report last updated in March 2016: https://bugs.chromium.org/p/chromium/issues/detail?id=99358

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by danvdragos on Thursday March 02, 2017 @06:29AM (#13773320)
What is it useful for? I saw someone on medium saying they would pay for software that turns his posts into a book but more than that?
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by k1m on Thursday March 02, 2017 @06:42AM (#13773386)
A better reading experience. If you like to print articles to read offline, you can either rely on the publisher's own print stylesheet, or use an application like ours.

It uses the same formatting for all articles and adds columns. It's not a CSS framework like Gutenberg, the one posted here, which is intended for publishers to make their own content more printer friendly. PDF Newspaper tries to extract the relevant article content from any given page and then apply its own standard formatting on that and make it printable with our own printer stylesheet.

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by danvdragos on Thursday March 02, 2017 @07:20AM (#13773529)
Yes, columnar reading is something special. Reminds me of ACM communication magazine. Though this must be a very small niche with web being so convenient - just click any link and read it...
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by NicoJuicy on Thursday March 02, 2017 @04:56AM (#13772918)
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 ;) )
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by vanderZwan on Thursday March 02, 2017 @05:52AM (#13773157)
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 we... by dspillett on Thursday March 02, 2017 @07:04AM (#13773460)
When I've seen this it has been browser specific, though I can't remember which way around (in fact it might be sometimes one that does and sometimes the same one that doesn't...) so if you get odd printing results with Chrome try in FF (or vice versa, or add Edge into the mix if on Windows, or ...).

Printing can be quite a faf from web pages.

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by danvdragos on Thursday March 02, 2017 @06:41AM (#13773373)
Yes, CSS3 has a new module CSS Paged Media Module [0]. This should eventually replace XSL-FO for formatting for print. What I don't understand is who finds these useful anymore? except big enterprises like telecoms with dying legacy requirements. Those requirements will get totally replaced by web... Maybe there is still a niche for archiving with PDF/A

*Maybe publishers that don't want to be locked in with a single formatting tool (indesign)

[0]https://www.w3.org/TR/css3-page/

Re:Show HN: Gutenberg – Modern CSS framework to print the we... by adrianN on Thursday March 02, 2017 @05:12AM (#13772988)
IE 4.0 supports it...
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by amichal on Thursday March 02, 2017 @08:05AM (#13773720)
Yep. Before that we used to wrap things in table cells to simulate page-break-avoid. This mostly worked. "Orphan" control was impossible at the time. I think most of the browsers do an ok job. Price ml does it all. Including things like toc generation and forcing sections to start on the front of a piece of paper or have a gutter in the "inside" of the page.
Re:Show HN: Gutenberg – Modern CSS framework to print the we... by babuskov on Thursday March 02, 2017 @05:38AM (#13773090)
I recall using those in 2002 or somewhere around that time. :)