PDF pop-up

Working with Media (graphics, audio, video) & other Assets

Moderator: Nav

PDF pop-up

Postby Greycious » Mon Jan 05, 2015 9:09 am

Hi Nav,

In my module, I use hyperlinks that link to PDF's. When using Internet Explorer, a pop-up shows every time you click the hyperlink (do you want to save or open). Unfortunately, I have to use IE. Is there any workaround to open the PDF inside the module? I cannot find the option to do so. It is important to maintain the PDF, since it has a certain layout with images in it. So rebuilding it with textboxes is not an option.

Cheers, Sarah
Greycious
 
Posts: 25
Joined: Tue Oct 28, 2014 5:40 am

Re: PDF pop-up

Postby Nav » Mon Jan 05, 2015 10:41 am

Hi Sarah,
That dialog box comes from IE, and you can probably customize what it does - but only for your browser. So that won't help your learners.

Instead, you might try using an IFrame. http://help.smartbuilder.com/node/195

Basically, add the IFrame to your page (you can see the first part of the video here http://help.smartbuilder.com/node/564 ), size it accordingly, and then point to the PDF using the "Select Asset" property in the Properties panel. You can show and hide the IFrame as you see fit (maybe the hyperlink shows the IFrame in a display, and then you have a Close button above the IFrame that hides the Display). Keep in mind that you cannot layer anything directly on top of the IFrame, as the IFrame always floats to the top.

Let me know if that doesn't help!

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: PDF pop-up

Postby Greycious » Wed Jan 07, 2015 11:09 am

Hi Nav,

The iframe works like a charm but gives the same popup :(. Can I make an infographic of it in JPG-format? This would be higher than my page height, but maybe I can also apply a scrollbar to an image?

Cheers, Sarah
Greycious
 
Posts: 25
Joined: Tue Oct 28, 2014 5:40 am

Re: PDF pop-up

Postby Nav » Wed Jan 07, 2015 11:37 am

Hi Sarah,
That's too bad that you get the same popup even with an IFrame. I think FF and Chrome have built in PDF readers and would show it automatically.

You cannot apply a scroller to an image, but you could put the graphic (PNG or JPG) in an IFrame! That should display as expected, and give you scroller you want. We've actually used this method in the past instead of 1-page PDFs. Basically do the exact same thing you were doing with the PDF in the IFrame, but instead point to an image. Let me know if that works for you.

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: PDF pop-up

Postby Greycious » Fri Jan 09, 2015 8:07 am

Hi Nav,

This also works like a charm. Onfortunately, my client has the policy that iFrames are not allowed... So, now I got the suggestion from an engineer that adding a javascript could solve the problem. I have been searching in smartbuilder, but I cannot find the place where I could add this script (the script is: response.setHeader( "Content-Disposition", "inline;filename=" + filename )).

Any tips on this one?

Cheers, Sarah
Greycious
 
Posts: 25
Joined: Tue Oct 28, 2014 5:40 am

Re: PDF pop-up

Postby Nav » Fri Jan 09, 2015 10:33 am

Hi Sarah,
Where would you normally put that script if this were a regular webpage, and not SmartBuilder? Near the link? In the header? Without a little more context, I'm not sure what it does.

There isn't a place to just add javascript to SmartBuilder - it needs to be either added post-download in to the html shell, or as part of the hyperlink (maybe), or you link to an html page that has this javascript in it.

This is beyond my knowledge of javascript, but I would say if you can get that script to work outside of SmartBuilder, we can then adapt it to work inside SB (either by linking to what you've got working, or adding it to the SmartBuilder html shell).

I did find this forum post suggesting the same solution, http://www.coderanch.com/t/561315/Servl ... le-broswer , but I believe that this is java code changed on the server delivering the lesson and the PDF, not javascript added to a lesson or html page. In which case, you'd need to alter the LMS server (or wherever the lesson is going to be delivered from in the end).

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: PDF pop-up

Postby Greycious » Tue Jan 13, 2015 8:20 am

Hi Nav,

The PDF was just loaded as an asset from Smartbuilder. Just so you know: we finally got ourselves a workaround by converting the PDF to a SWF. This seems to work and does not give a popup.

Cheers, Sarah
Greycious
 
Posts: 25
Joined: Tue Oct 28, 2014 5:40 am

Re: PDF pop-up

Postby Merel » Thu Jan 29, 2015 5:12 am

Hi Nav,

Now i'm putting some other .swf files into the module.
Only when it pops up, it has a different format.
I saw you added some guidelines if you want to use .swf files, but I can't see what I have to do.

At page 5, you can see one of these examples.
Can you explain to me how i can have a good format?

Thanks!


- Merel
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am

Re: PDF pop-up

Postby Merel » Thu Jan 29, 2015 7:01 am

And one last question:(for today ;)) :

I want to move the logo (ING) and the orange line to the bottom.
So i went to the masterpage for that. But i cant find anywhere how i can move them.
I don't see them as seperate objects..

How is it possible to move these?

Thanks in advance!

- Merel
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am

Re: PDF pop-up

Postby Merel » Thu Jan 29, 2015 7:14 am

Last question has been answered.. Now i see Sarah used a basic template for it.
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am

Re: PDF pop-up

Postby Nav » Thu Jan 29, 2015 12:03 pm

Hi Nav,

Now i'm putting some other .swf files into the module.
Only when it pops up, it has a different format.
I saw you added some guidelines if you want to use .swf files, but I can't see what I have to do.

At page 5, you can see one of these examples.
Can you explain to me how i can have a good format?

Thanks!

Hi Merel,
I don't know what I'm looking at. What is wrong with the format? What should it look like? Is there an example of a good format that you can point me to? When you're using an IFrame or popup in a new window, because it is separated from the main SmartBuilder content, you don't really have to follow any guidelines that we provide.

If it's looking different than you expect, maybe it's a setting in whatever tool you're using to create the SWF? Maybe check with Sarah to see if there's an option you need to use to make it look a certain way?

- Nav
Nav
 
Posts: 866
Joined: Mon Nov 05, 2007 2:58 pm

Re: PDF pop-up

Postby Merel » Fri Jan 30, 2015 1:21 am

Yes, I will check this out.
It is not the most important.

Thanks! I will look for a solution.

- Merel
Merel
 
Posts: 9
Joined: Wed Jan 14, 2015 2:33 am


Return to Media & Assets

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Not able to open ./cache/data_global.php