yakivmospan / github-wikito-converter

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

Using pdf format for output throws an error #14

Closed zlotny closed 6 years ago

zlotny commented 6 years ago

Using version: 1.3.0

Using gwtc like this: gwtc -f pdf ./MySoftware.wiki

Gives me this error:


      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at _errnoException (util.js:999:13)
    at WriteWrap.afterWrite [as oncomplete] (net.js:883:14)```

HTML works fine. Any suggestions? Thank you so much
zlotny commented 6 years ago

Nevermind, I solved that issue. I had not installed wkhtmltopdf.

Now I have another problem. Everytime I generate a PDF it is corrupt (tested with okular and Acrobat Reader 9 in Linux)

yakivmospan commented 6 years ago

Can you attach it ? And if possible, attach the .md files?

zlotny commented 6 years ago

Hi there.

Sorry about the few details, I was almost heading home and was in a bit of hurry. Some details to check the problem:

The command I'm executing is: gwtc -f -v pdf DualSPHysics.wiki/

The wkhtmltopdf version is: wkhtmltopdf 0.12.4

The output is:

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

I generates this file (documentation.pdf): https://drive.google.com/open?id=1NsMhslef7AENeFMsnUUsR3jMuhVusRWO

From this wiki: https://github.com/DualSPHysics/DualSPHysics.wiki.git (you can clone it).

Noting that wkhtmltopdf works absolutely fine if I first generate an HTML and then convert it. Though this way the table of contents is not the "nice" one and the result is somewhat valid but could be prettier.

Thanks for the help!

yakivmospan commented 6 years ago

Thanks for update, so first of all, I assume the command was:

gwtc -f pdf -v DualSPHysics.wiki/

And the other thing is, if you are on the Mac OS, wkhtmltopdf has regression issue with 0.12.4 version. I'm using 0.12.3 and here is an pdf output of above command for your repository. Is this version OK for you ?

File that you've uploaded to the drive, I can not even open it, the same for you ?

Thanks, Yakiv

zlotny commented 6 years ago

Hi there! Thank you for the answer.

The version that you attached is perfect. I'm using Manjaro (Arch linux) with the wkhtmltopdf installed from the community repo. I'll try to get the same version as you (0.10.3) and try again.

The file I've uploaded to the drive indeed can't be opened. As I said in my replay to the first message of the issue, it always generates corrupted pdf files, not readable.

I'll reply here when I manage to install the 0.12.3 and see if it works.

zlotny commented 6 years ago

I tested it with 0.12.3 and the problem persists.

Sorry for the hassle, tomorrow i'll check in a CentOS server if it works, I've tried 3 arch-based distros and none of them work (2 manjaro and 1 archlinux). Maybe its the packages on the repo, don't know.

Thank you for the help.

yakivmospan commented 6 years ago

Sorry to hear that, as far as I understand the tool is already built in with OS distribution, try to install the downloaded version instead, as mention in this topic of wkhtmltopdf javascript wrapper that is used in github-wikito-converter.

Also you may try to update that wrapper tool version to the latest 0.3.4, as in github-wikito-converter 1.3.0 I'm using the older ^0.1.5 version. But for this you will need to manually build the tool.

Hope this will help you.