window.InitUserScripts = function()
{
var player = GetPlayer();
var object = player.object;
var once = player.once;
var addToTimeline = player.addToTimeline;
var setVar = player.SetVar;
var getVar = player.GetVar;
var update = player.update;
var pointerX = player.pointerX;
var pointerY = player.pointerY;
var showPointer = player.showPointer;
var hidePointer = player.hidePointer;
var slideWidth = player.slideWidth;
var slideHeight = player.slideHeight;
window.Script1 = function()
{
  var styles = '@media print { @page { size: A4 landscape; margin: 0; } body, html { width: 100%; height: 100%; transform: scale(1.262); transform-origin: top left; overflow: hidden; } }'; 
var stylesheet = document.createElement('style'); 
stylesheet.type = 'text/css'; 
stylesheet.innerText = styles; 
document.head.appendChild(stylesheet);
}

window.Script2 = function()
{
  // Get today's date
var today = new Date();

// Extract day, month, year
var day = ("0" + today.getDate()).slice(-2);
var month = ("0" + (today.getMonth() + 1)).slice(-2);
var year = today.getFullYear();

// Format as DD/MM/YYYY
var formattedDate = day + "/" + month + "/" + year;

// Set it to your Storyline variable
var player = GetPlayer();
player.SetVar("date", formattedDate);
}

};
