OPENHAB documentation in PDF

Is it possible to remove spoilers from Manual WEB page ?
I 'd like to convert WEB page to PDF, but this doesn’t work for spoilers.

http://docs.openhab.org/installation/linux.html#installation

linux_instructions.pdf (255.2 KB)

You need to extract the main content first before trying to print: Assuming you use “print to pdf”, let’s make you a javascript and use chrome to do just that:

ctrl+shift+I to get to the developer tools, go to the console page and paste the following:

var allContent = document.getElementsByClassName("content");
var mainContent = allContent[0];
var printingWindow = window.open('', '', 'left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0');
printingWindow.document.write(mainContent.innerHTML);
printingWindow.document.close();
printingWindow.focus();
printingWindow.print();
printingWindow.close();

@ThomDietrich, maybe we should have a button for this?

3 Likes

thanks! That’s exactly what I need!

1 Like

Hi @StNick, to make things easier in the future a “Print This Page” button has been added to the bottom right of each page!

Thanks! Great news!