Skip to main content
karit66557003
Participant
February 10, 2018
Question

JavaScript: Printing (Landscape)

  • February 10, 2018
  • 0 replies
  • 4759 views

I have learned that if a person's printer is set up in Portrait mode by default, there is no JavaScript that can be added (including to a Captivate file) to force or change the printing orientation from Portrait to Landscape.

However, I have heard that some CSS can be added to an HTML page to help.

<style type="text/css" media="print">

@4025150{ size: A4 landscape; margin: 2cm; }

</style>

Questions:

  • Assuming it works, can code like this be added from within the Captivate authoring file such that when it exports the CSS code can be added?
  • Or, does someone have a clever way of programmatically changing the printer orientation (so the learner/user) does not have to?

I do know that adding the following one line of JavaScript will enable the Print dialog box to be displayed:

window.print();

The problem is, there are no additional parameters that can be added that would programmatically change the orientation settings from Portrait to LandScape.

If anyone has any suggestions ...

Thank you.

This topic has been closed for replies.