10

I have a project description in PDF and I will be quite happy if I can somehow manage to preview it in github website rather than clicking "View Raw" and downloading it.

I thought there could be a converter from pdf to github flavored markdown yet found none.

To state again, my input is a pdf file and my desired output is the preview the contents of the pdf in github website without downloading it.

dj2
  • 9,534
  • 4
  • 29
  • 52
Seçkin Savaşçı
  • 3,446
  • 2
  • 23
  • 39
  • PDF is a very complex format. It may have many layers of information. It may not even contain an actual text, just outlined symbols. Ligatures may be replaced by corresponding unicode symbols. Any nontrivial formatting will be very hard (if at all possible) to translate to Markdown. And you cannot diff PDFs, so if you description changes, you just have a new blob in your repo. All in all, it is much more convenient to keep your description in ``.md`` and generate the ``.pdf`` out of it. – fjarri Oct 14 '13 at 14:53
  • @Bogdan it is not about keeping, yet file is provided in pdf. – Seçkin Savaşçı Oct 14 '13 at 15:01
  • That's why it's not an answer, but a comment. I just want to give an idea how complex and unreliable a possible converter would be. I only know about OCR-based solutions that do that, and it seems like an overkill. – fjarri Oct 14 '13 at 15:06
  • @Bogdan I definitely agree on the OCR-based solution being an overkill. – Seçkin Savaşçı Oct 14 '13 at 15:13
  • It is now possible! See my (updated) answer below. – VonC Mar 18 '15 at 12:11
  • @VonC But how to generate a markdown file out of the PDF? – lifebalance Oct 06 '16 at 04:52

1 Answers1

2

Update March 2015: "PDF Viewing"!

Simply browse to a PDF document and we'll render it in your browser like any other file.
From presentations to papers, we've got you covered.
Many thanks to Mozilla and every contributor to PDF.js.

https://cloud.githubusercontent.com/assets/2546/6703741/cbb216c0-ccfc-11e4-9c15-ecb6a33e8ddb.gif


Original answer (October 2014)

This is simply not (yet?) supported in GitHub.

The best you can do is a greasemonkey extension which would allow you to call a pdf viewer, like the recent pdf.js (a Portable Document Format (PDF) viewer that is built with HTML5.), allowing you to view a pdf entirely online, without any pdf plugin installed.
See that example on jsbin.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 2
    @lifebalance the question was less about markdown generation, and more about the ability to preview a pdf content on GitHub. For generating a markdown, you would still need to clone the repo or to download the pdf directly, and apply a third-party tool (like https://github.com/johnlinp/pdf-to-markdown), but there is no guarantee there. – VonC Oct 06 '16 at 06:38