Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JavaScript: Printing (Landscape)

Community Beginner ,
Feb 10, 2018 Feb 10, 2018

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">

@page{ 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.

TOPICS
Advanced , Editing
4.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Help resources