learnxinyminutes-docs icon indicating copy to clipboard operation
learnxinyminutes-docs copied to clipboard

pdf version of the site

Open mofosyne opened this issue 11 years ago • 14 comments

Not sure if practical, but it would be nice if you can periodically generate a PDF version this content. Would make for a handy reference in an ebook or smartphone.

mofosyne avatar Aug 20 '14 04:08 mofosyne

This would be nice @mofosyne. What would be nicer is instead of a PDF being generated every now and then, have a PDF be generated whenever you want via client-side on the website.

From a very quick look online and on GitHub, I found a client-side (js) library that can generate PDFs from HTML. Should be as easy as including this library in the HTML of the site generator right @adambard?

levibostian avatar Aug 20 '14 16:08 levibostian

Sounds like a good idea if it can be implemented. Would make for a portable installation.

On Thu, Aug 21, 2014 at 2:18 AM, Levi Bostian [email protected] wrote:

This would be nice @mofosyne https://github.com/mofosyne. What would be nicer is instead of a PDF being generated every now and then, have a PDF be generated whenever you want via client-side on the website.

From a very quick look online and on GitHub, I found a client-side (js) library http://parall.ax/products/jspdf that can generate PDFs from HTML. Should be as easy as including this library in the HTML of the site generator right @adambard https://github.com/adambard?

— Reply to this email directly or view it on GitHub https://github.com/adambard/learnxinyminutes-docs/issues/728#issuecomment-52802213 .

mofosyne avatar Aug 21 '14 00:08 mofosyne

@levibostian From what I can tell, that library requires you to build the doc in Javascript, as in

var doc = new Doc()
doc.addText(...)
doc.addText(...)

So I don't think it'll be as easy as dropping it into the HTML of our site. They do have a HTML renderer version, but it is still "early stage" according to their own site. Sounds like more trouble than it's worth.

Given that "print to PDF" is a ubiquitous feature nowadays, how relevant is this issue?

geoffliu avatar Nov 18 '14 02:11 geoffliu

I don't see the issue being a big deal to users. The site looks good on mobile which is a big help. I have always been nervous with the thoughts of PDF versions of the site because you run into a bunch of outdated PDFs all over the web but I suppose that is not too big of a deal.

levibostian avatar Nov 18 '14 05:11 levibostian

@levibostian Agreed, I'm not a big fan of PDFs either. @mofosyne and @g-liu, what's the use case you two have in mind that can't accomplished by "print to PDF" from a browser?

geoffliu avatar Nov 18 '14 05:11 geoffliu

I'm a big fan of PDFs. Not having to have an internet connection / being able to read those on kindles and the like is a very nice feature.

vendethiel avatar Nov 18 '14 08:11 vendethiel

I would love a pdf cover. It could be cool to add a kind of header to each PDF with a link to the repo to download the last release of the PDF.

If a pdf support is dont, it would be nice to make a djvu support either.

gitbook could be a nice solution.

aloisdg avatar May 02 '15 12:05 aloisdg

I created a project for learnxinyminutes pdf builds. https://github.com/aviaryan/learnxinyminutes-pdf

It has both all-in-one and individual pdfs.

aviaryan avatar Jan 22 '16 07:01 aviaryan

@aviaryan Nice !

aloisdg avatar Jan 22 '16 07:01 aloisdg

@aviaryan great work! Any chance this can be integrated into the website in some shape or form? Still a good project otherwise.


A possible compromise, is maybe to link to the build folder of @aviaryan github project. And to just periodically update that.

mofosyne avatar Jan 22 '16 09:01 mofosyne

A possible compromise, is maybe to link to the build folder of @aviaryan github project. And to just periodically update that.

Are you aware of any free technology that can hook on a github project and run commands on triggers. Or something that can run periodically over a server and update my repository.

aviaryan avatar Jan 22 '16 10:01 aviaryan

@adambard might be able to setup a post-commit hook?

vendethiel avatar Jan 22 '16 10:01 vendethiel

maybe i didn't read carefully

but why not use print friendly website? it's very convenient already. i don't understand why this should be implemented

ifmihai avatar Mar 23 '16 13:03 ifmihai

Building on what @geoffliu said, it's possible to just use a print.css file to help generate properly formatted PDFs in the browser itself. I'd be happy to work on that.

divayprakash avatar Mar 23 '16 16:03 divayprakash