yakivmospan / github-wikito-converter

Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
Other
296 stars 52 forks source link

Rendered PDF is empty #39

Closed martijnende closed 5 years ago

martijnende commented 5 years ago

I installed github-wikito-converter from npm, but when I try to render a PDF file, the resulting output is an empty file.

Below are the steps I took:

sudo apt install wkhtmltopdf
sudo npm install -g github-wikito-converter
git clone https://github.com/yakivmospan/github-wikito-converter.wiki.git
gwtc -v -f pdf github-wikito-converter.wiki/

Output of last step:

debug:   gwc launched with options format=pdf, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug:   Found 1 markdown files and 1 links pointing to them in TOC
debug:   Generating pdf: 1 pages to generate

I get no errors or warnings other than quoted above. As I mentioned, the output is a plain empty file called documentation.pdf. Generating an HTML file seems to work just fine. I'm on Linux Mint 19.

jaredbriskman commented 5 years ago

I just encountered the same issue, and resolved it. It appears the version of wkhtmltopdf in apt is not sufficient to render PDFs correctly.

(I think this has something to do with the version of QT webkit in the apt package not being patched for wkhtmltopdf, and as such failing on some of the gh-flavored markdown)

Purging my apt install of wkhtmltopdf, then Installing the latest stable static release from their site fixed the issue for me.

martijnende commented 5 years ago

Ok, thank you for looking into it

petrkalina commented 4 years ago

Recent installation that seems to work at the moment:

The default wiki and outcome:

apt-get install git
cd /tmp
git clone https://github.com/yakivmospan/github-wikito-converter.wiki.git

gwtc -v -f pdf github-wikito-converter.wiki/
debug:   gwc launched with options format=pdf, output=./, filename=documentation, title=Documentation , logoImage=null, footer=null, pdfPageCount=null, tocTitle=Table of contents, tocFile=null, tocLevel=3, highlightTheme=github, userCssFile=null, verbose=true, disableInlineAssets=false
debug:   Found 1 markdown files and 1 links pointing to them in TOC
debug:   Generating pdf: 1 pages to generate
info:    pdf file written: documentation.pdf
documentation.pdf

root@12164e86d115:/tmp# ls -l
-rw-r--r-- 1 root root 18864 Feb 26 19:26 documentation.pdf