How do I send content to the user's printer from the Layout?

0 favourites
From the Asset Store
The soundstage is set for an immersive listening experience sending your audience adrift.
  • Here's another .capx I use for playing

    I just tested adding an effect then printing and it printed correctly, including effect.

    May I humbly request of any other users that have a moment to please test this also.

  • Oh my goodness! So it IS a browser issue after all!

    The above .capx did not even display correctly in Firefox 30.0 (no buttons were shown), so I tried it in Chrome 35.0 and it worked first time!! <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised">

    I then went back to my original URL (now updated to include your script), and tried this in Chrome as well and it also worked first time. <img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked">

    I then updated Firefox to version 31.0 to match yours (just in case it was a feature unsupported in Firefox 30.0) and then tested the original URL as well... but it still didn't work!

    Bizarre! Please can you test my URL to see if the print function works for you in your browser? <img src="{SMILIES_PATH}/icon_e_confused.gif" alt=":?" title="Confused"> I am very VERY confused...

    http://angelserver.in/html5/dinotrain/

    Thank you for all of your assistance, I really appreciate the time you've taken to help me resolve this issue.

  • Sounds like an addon stopping the functionality. Try disabling any and all Firefox addons, then add one at a time to find the culprit.

  • Just disabled everything, and it doesn't seem to be this either

    I just got my colleague to test it out as well and it mirrored my experience -worked in Chrome, not in Firefox.

    ...To add insult to injury, I just tested it in Internet Explorer and it worked lol.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi,

    i tried your link in Firefox 30 & 31 and just got blank pages. Chrome works fine though.. strange.

  • Ouch, same as me... okay. At this rate, I think I may try to tackle the issue slightly differently and save the contents to an image file instead of printing, and hope that I don't run into any further compatibility issues.

    Thank you for all your help.

  • I tried using an iframe to print the resulting canvas snapshot, and it seems to be working in Chrome.

    Use the "On canvas snapshot" trigger and add the following executeJS :

    "var iframe = document.getElementById(""iframe"");
    if(!iframe) iframe = document.createElement(""iframe"");
    iframe.frameBorder=0;
    iframe.width=""0px"";
    iframe.height=""0px"";
    iframe.id=""iframe"";
    iframe.setAttribute(""src"", ""about:blank"");
    document.body.appendChild(iframe);
    var image = new Image(); image.src = """ & CanvasSnapshot & """; $(""#iframe"")[0].contentWindow.document.open(); $(""#iframe"")[0].contentWindow.document.appendChild(image); $(""#iframe"")[0].contentWindow.document.close();
    window.frames[""iframe""].focus();
    window.frames[""iframe""].print();"[/code:1d3shdhx]
  • Good afternoon. I'm also creating a game and I need to print a form, I think like this (Character Image = character information), to create a type of album ...

    Have you been able to print or not yet?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)