Live data from Hacker News

PDF Viewing

github.com

11–20 of 63 posts

Re: PDF Viewing

#11
That gif went by way too fast.

If anyone is confused like me: It looks like Github will now show PDFs inline.

It took me a minute to figure out that the GIF was a demo (and this had nothing to do with rendering PDFs into realspace using a 3d printing robot), and the page was from github's official blog.

Re: PDF Viewing

#14
I don't understand it... what's the benefit of this as opposed to just embedding an iframe? And whats the role of pdf.js here? They seem to just show images of the pages - non interactive and non-selectable. When you are using pdf.js, you can actually get a nice embedded viewer exactly like firefox has (and similar to chrome). And the embedded pdf.js viewer would also be more secure than the iframe, if that's your concern.

Re: PDF Viewing

#15
Now they are going to show json, xml, yaml, graphviz, audio files, video files, display docx, xlsx, pptx, prettify your minified code, build a database for you from SQL backups and let you query it, set up an environment from your .env files and give you a shell prompt, show you a rendered DOM from your HTML files and virtual dom declarations, display structured data from microformats, microdata and json-ld, let you query structured data from inside files so GitHub can be really used as a database, deploy your app, run your code and search for actual and potential errors, find your lost TV remote, wash your car and cook your dinner.

This is partly serious and I think GitHub is awesome.

Re: PDF Viewing

#16

I don't understand it... what's the benefit of this as opposed to just embedding an iframe? And whats the role of pdf.js here? They seem to just show images of the pages - non interactive and non-selectable. When you are using pdf.js, you can actually get a nice embedded viewer exactly like firefox has (and similar to chrome). And the embedded pdf.js viewer would also be more secure than the iframe, if that's your co…

My guess is that it can then show deltas. I like how they show changes in graphics in e.g. PNG files

Re: PDF Viewing

#17

is there a way to render pdf into html that can be viewed in a browser?

pdf.js. It's the same thing github is using (as stated on the article), and it's also what firefox uses to render PDFs (yes, firefox renders PDFs with html+js).

Re: PDF Viewing

#18
Any sane reason to store PDF files into git repositories? Why would you version binary files; version LaTeX, or whatever's generating your PDFs.

Re: PDF Viewing

#19
post #15

Now they are going to show json, xml, yaml, graphviz, audio files, video files, display docx, xlsx, pptx, prettify your minified code, build a database for you from SQL backups and let you query it, set up an environment from your .env files and give you a shell prompt, show you a rendered DOM from your HTML files and virtual dom declarations, display structured data from microformats, microdata and json-ld, let you…

Zawinski's law - "Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can." Humorous and relevant.

Re: PDF Viewing

#20
post #6

If GitHub continues on this track of making content available directly in the browser, the use cases are endless as a service. When someone, and someone will, makes git accessible to the general public, features like these will propel GitHub into the general consumer space.

I've been using GitHub a lot lately for storing my class notes and this is really awesome. I use an app which allows Markdown/mathematical LaTeX and renders it to a PDF and previously they were impossible to view on mobile because of how raw assets are served.

Which app do you use?
Post reply on HN