Storyline 360 Tutorial

Storyline 360: Best Practices for Customizing Print Results with JavaScript

While Articulate Storyline 360 provides robust built-in features for interactive course development, printing customized user text entries, notes, or reflection handouts directly from a slide often requires custom scripting.

By integrating JavaScript with an external HTML template embedded as a Web Object, developers can allow learners to generate formatted hard copies or save their typed responses as PDF documents.

Primary Use Cases for Custom Print Outputs

  • ✓
    Personalized Handouts

    Compile learner reflections, journal responses, or notes into a clean, printable document.

  • ✓
    Action Plans

    Allow learners to export custom goal-setting matrices or scenario action plans at the end of a module.

  • ✓
    Custom Certificates & Logs

    Generate detailed activity completion summaries without relying solely on default LMS reporting.

Step-by-Step Implementation Guide

  1. 01

    Prepare the HTML Print Template

    Download or create a lightweight HTML print template (print_template.html) formatted to style and arrange your exported text fields.

  2. 02

    Set Up Storyline Text Variables

    • Insert Text Entry fields onto your slide canvas.
    • Assign unique text variables (e.g., LearnerNote1, LearnerNote2) to capture user inputs.
  3. 03

    Embed the Web Object Template

    • Go to the Insert tab on the Storyline ribbon and select Web Object.
    • Browse to the local folder containing your custom HTML template file.
    • Resize the inserted Web Object container and position it entirely outside the visible slide preview stage.
  4. 04

    Add Action Triggers and JavaScript

    • Create a Submit button to pass variable values to the embedded frame.
    • Create a Print Result button and attach an Execute JavaScript trigger when clicked:
    var player = GetPlayer(); var text1 = player.GetVar("LearnerNote1"); var text2 = player.GetVar("LearnerNote2"); // Communicate with the embedded Web Object window to trigger print command var webObject = document.querySelector('iframe'); if (webObject) { webObject.contentWindow.postMessage({ note1: text1, note2: text2 }, '*'); webObject.contentWindow.print(); }
  5. 05

    Publish and Validate

    Publish your project to Web or LMS format. Launch the published course on a web server to verify that the print dialog triggers and renders formatted text entries correctly.

Workflow Component Reference

Component Function in Workflow
Text Entry Variables Collects dynamic learner inputs dynamically during course runtime.
Web Object (Off-Stage) Holds the external HTML/CSS print template without cluttering slide visuals.
GetPlayer().GetVar() Fetches live Storyline text values to pass into the print layout script.
contentWindow.print() Triggers the native browser print/save-to-PDF window from the embedded document.
FAQ

Frequently Asked Questions

Will this print function work when running the published course locally?

No. Modern browser cross-origin security policies block iframe communication on local file systems (file://). Courses must be uploaded to a web server or LMS environment.

Can learners save their output as a PDF instead of printing to paper?

Yes. The native browser print interface launched by window.print() allows users to select "Save as PDF" as their target destination printer.

Why position the Web Object outside the slide canvas preview area?

Placing the Web Object off-stage keeps the HTML container invisible to the learner while keeping the document active in the DOM structure for JavaScript calls.

Related Solutions

Explore Related eLearning Solutions

Custom E-learning Solutions

Create interactive, tailored digital learning experiences built from the ground up to support enterprise goals and localization needs.

Learn more about Custom E-learning Solutions

Learning Management System (LMS)

Centralize training administration, automate employee compliance tracking, and deliver seamless digital learning across your organization.

Learn more about Learning Management System (LMS)

Off-the-Shelf Courses

Accelerate enterprise capability with a comprehensive library of pre-built, SCORM-compliant courses ready for immediate deployment.

Learn more about Off-the-Shelf Courses
Get in Touch

Ready to Transform Your Training?

Get a tailored project proposal, custom timeline, and a free SCORM sample built directly from a slice of your existing training materials.

  • Free Proof-of-Concept

    Send us a short document or presentation, and we'll transform it into an interactive SCORM sample so you can judge our instructional design.

  • Expert Consultation

    Talk directly with our eLearning specialist to align your business goals with the right technology stack.

  • Transparent Pricing

    Clear cost estimates and realistic project milestones delivered with zero hidden fees.

Prefer direct email? Reach our lead team at [email protected].

Send Us a Message

Fill in a few details and we'll get straight back to you.