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

Get help using Construct 2

Post » Wed Jul 23, 2014 11:31 am

Hm. In that case, would I need a more bespoke solution in Javascript? Will C2 support this?

I found this on StackOverflow, I wondered if I might be able to implement something like this:

http://stackoverflow.com/questions/4716 ... -on-a-page
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 23, 2014 12:09 pm

I just quickly tried the attached which as you say, is probably just the page and not the snapshot:/ Although if I omit the Take Snapshot action, I also get a blank page! But adding the Take Snapshot printed the Outlined text and image.
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Wed Jul 23, 2014 12:24 pm

Hm, downloaded the file and tried it but it didn't work for me? :(
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 23, 2014 12:47 pm

I can't explain it?! Works every time for me.

What browser are you using? I always use Firefox (currently Firefox 31.0).
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Wed Jul 23, 2014 1:24 pm

Ack! :( how frustrating!

I am using Firefox 30.0, so... can't imagine that would be it, could you?
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 23, 2014 1:53 pm

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.
You do not have the required permissions to view the files attached to this post.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Wed Jul 23, 2014 2:05 pm

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!! :o

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. :shock:

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? :? 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.
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 23, 2014 2:08 pm

Sounds like an addon stopping the functionality. Try disabling any and all Firefox addons, then add one at a time to find the culprit.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,422
Reputation: 59,530

Post » Wed Jul 23, 2014 2:19 pm

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 :P lol.
B
7
S
1
Posts: 61
Reputation: 588

Post » Wed Jul 23, 2014 4:29 pm

Hi,
i tried your link in Firefox 30 & 31 and just got blank pages. Chrome works fine though.. strange.
B
48
S
16
G
9
Posts: 1,098
Reputation: 11,197

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: dand, Maydie, mickclarke and 24 guests