lwchkg / gitbook-plugin-sunlight-highlighter

Sunlight highlighter for GitBook. This highlighter produces better syntax highlighting than the default highlighter in some languages.
Other
5 stars 2 forks source link

GitBook PDF build output is not satisfactory #7

Open lwchkg opened 7 years ago

lwchkg commented 7 years ago

testing.pdf

lwchkg commented 7 years ago

Output of gitbook-pdfgen is satisfactory. This is potentially a Calibre related issue.

chbndrhnns commented 7 years ago

I see a white background in a PDF export when using the sunlight highlighter. Can I do something about it?

screenshot 2017-09-19 11 58 20
lwchkg commented 7 years ago

Just checked the epub output in https://www.gitbook.com/book/lwchkg/tests-of-sunlight-highlighter/details. The HTML there is indeed STRANGE (has class for plaintext but it is actually javascript). The only possibility is the intervention of Calibre, which is sadly out of the possibility to fix.

The default theme, however, appears less bad.

BTW, if all you want is some PDF output, why not to try https://www.npmjs.com/package/gitbook-pdfgen? The output of that CLI utility appears to be much nicer.

Anyway, if you're interested in gitbook-pdfgen, check https://github.com/lwchkg/vbnet_intro_book/tree/master/vbnet_intro_part2a to know how to customize the content page.

chbndrhnns commented 7 years ago

I gave it a try and noticed that the setting pdf.fontSize does not seem to be followed:

screenshot 2017-09-19 14 04 00

Any idea on that?

lwchkg commented 7 years ago

There is no mechanism to pass any font size to wkhtmltopdf by now. If you want such mechanism I could write it later this week.

BTW, if you like try to extract the custom TOC from my vbnet example.

On Sep 19, 2017 8:04 PM, "chbndrhnns" notifications@github.com wrote:

I gave it a try and noticed that the setting pdf.fontSize does not seem to be followed:

[image: screenshot 2017-09-19 14 04 00] https://user-images.githubusercontent.com/7534547/30591506-700a5d86-9d43-11e7-9cf2-4545e13a450f.png

Any idea on that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lwchkg/gitbook-plugin-sunlight-highlighter/issues/7#issuecomment-330517972, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7FN_tpSQYMeRIoR1bwtW7rXWWIkK51ks5sj63igaJpZM4ONf53 .