0

I am using Mediawiki with the Tweeki skin. I would like to customize the Mediawiki:Print.css page so when I print into a PDF thanks to PhantomJS binaries and H2P plugin, the templates of the output PDF is the same as the template on my wiki. Using bootstrap, I take advantage of CSS styling such as div class alert for example.

So here my double question: - Is there any possibility to tell wiki to print the content with the same styling when I am not in print mode? - As I can customize the header request sent by PhantomJS to the wiki in order to generate the PDF, is there a header attribute where I could force for example media <> print ?

Thank you :)

Joey
  • 33
  • 1
  • 4
  • I'm pretty sure that there's a Mediawiki:Default.css page, try editing that with your styles – twoleggedhorse Sep 26 '17 at 22:18
  • Normally you would not edit Mediawiki's original file. That's what Mediawiki:common.css and Mediawiki:Print.css page are made for. But for example, when I try to edit mediawiki:print.css and create an @import url rule, nothing change. It is as if the css is ignored :/ – Joey Sep 27 '17 at 09:48
  • I have found that updates can *sometimes* require restart of the mediawiki service and that browsers caching the CSS is definitely an issue with mediawiki – twoleggedhorse Sep 27 '17 at 11:38
  • I will try to dig that way to check if there is a problem. Else, is there any way to force @import over existing CSS such as !important ? – Joey Sep 27 '17 at 15:58

1 Answers1

0

OK so the solution was to edit directly the bootstrap base CSS and delete every @media print references.

Joey
  • 33
  • 1
  • 4