Highlight.js highlights when printing

55 views
Skip to first unread message

Matias Piipari

unread,
May 19, 2016, 1:03:57 PM5/19/16
to highlight.js
Hi there

I'm the author of a scientific word processor Manuscripts.app (http://manuscriptsapp.com), which uses Highlight.js for providing syntax highlighted code snippets. I've noticed recently that Highlight.js styled code doesn't behave quite how I would expect when printing (or by extension, when exported to PDF). I haven't been able to work out if or how it would be possible to configure the behaviour of Highlight.js for print such that the same styling would be retained (both colours and background colour)? Is this possible? Some quick searches in the documentation found no hits and I couldn't find any media queries in the CSS styles themselves. I've attached some example screenshots to give examples of what I mean.

The issue appears to be the same also for examples on the Highlight.js website (PDF attached). I can understand the current behaviour as a sensible default, but my question is, can I make printed output look the same as screen output? 

Matias 
Screen Shot 2016-05-19 at 17.50.00.png
Screen Shot 2016-05-19 at 17.51.22.png
How to use highlight.js.pdf
Reply all
Reply to author
Forward
0 new messages