Block Printing?

kristimcv
kristimcv Community Member Posts: 6
Is there a way to add code or a variable or anything to a Lectora title that would prevent the content from being printed from a browser window? I've see some information to block web page printing, but I wondered if there is a way to apply that in my course.  The course is accessed through our LMS and opens in a browser window. I don't have any control over the browser settings.

Thanks.

Kristi

Comments

  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    Easy. Here's the demo: https://dl.dropboxusercontent.com/u/11433463/trivantis/print-media/html/index.html
    Here's the source: https://dl.dropboxusercontent.com/u/11433463/trivantis/print-media/source.zip

    Explanation: You just have to include a special CSS rule that sets text style to invisible for printing using External HTML Object set to META TAGS, e.g.:
    <STYLE type="text/css">
    @media print {
      #pageDIV {
         display:none; !important
       }
    }
    </STYLE>
  • tdickey
    tdickey Community Member Posts: 23
    Hello Kristi,

    Have you tried selecting the 'Protect content' option check box on publish? We publish our courses to SCORM and this box is checked (see image) which prevents the content from being copied.
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    @tdickey "Protect content" only disables copying but not printing. It would actually make sense for Trivantis to have two checkboxes there "Protect content from copying" and "Prevent printing". @jvalley4735, this is a feature request :)
  • kristimcv
    kristimcv Community Member Posts: 6
    Thank you for your responses!

    TDickey, I had not thought to check "Protect content", but will.

    Sergey, Thanks for the CSS rule. I'll try to add that.

    Kristi
  • kristimcv
    kristimcv Community Member Posts: 6
    Sergey,

    Another question regarding the CSS rule. I am sorry for my ignorance, but does this need to be applied to every page in the title? Or can this be done at the title level?

    Thanks.

    Kristi

     
  • kristimcv
    kristimcv Community Member Posts: 6
    Hello again...I figured it out!

    Thanks again Sergey!

    Kristi

     
  • ssneg
    ssneg Community Member Posts: 1,466 ☆ Roadie ☆
    Just in case someone stumbles upon this link... If the External HTML object with the CSS code is on the Title level, it will be inherited in all the pages (and therefore make all of them unprintable). Placing the object into a chapter will only affect the chapter, and of course placing it on a single page will prevent printing of just that page. More on inheritance here: http://trivantis.com/blog/working-inheritance-lectora/
  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    @ssneg, I brought it to our developers attention.