How to print from GitHub

前端 未结 20 1163
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 20:17

If I want to print a markdown file from GitHub as it appears on screen, for example: https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md

Then how can

20条回答
  •  情歌与酒
    2021-01-29 20:26

    Found an awesome tool that achieves the printing results that I asked for: http://plessl.github.com/wkpdf/

    Here's a quote from its website: "If you want to render a website with all the graphical icing to exactly match the view in a browser, you can explicitly force the use of the CSS screen stylesheet and enable the printing of background images as in the following example ..."

    So I ran:

    wkpdf --source https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md
          --stylesheet-media screen
          --print-background yes
          --output printIt.pdf
    

    and it was magical!

提交回复
热议问题