News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Open PDF's in lightbox/frame in same page

Started by mrm92, 13.05.2016 08:22:03

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrm92

Hi,
I Have latest Joomla 3.5.1 and latest jDownloads 3.2.44.
In my site I have 2000 downloads and the 99% are PDF's. In configuration I set that the file is opened in other tabs but in the browser. I see in other sites that some pdf can be opened in the same page without reload it, like when you open an image in lightbox/frame. There's a way, in jDownloads, to do that? I have work with some plugin but no one seems to work.
Mine is mostly curiosity or desire to make a beautiful site aesthetically, or can be a new feature in new version of the component.

Thanks,
Luca
  •  

ColinM

Hi Luca
I do not quite understand.  You can select that the pdf is opened directly by the browser.  Maybe you could suggest a couple of sites that do what you want

Colin
Colin M
  •  

mrm92

#2
Hi Colin,
Yes, I know that I can open files in the browser and I have already set it. My question is about if it's possible open files (in my case pdf filed) in lightbox or frame.
Like this: http://jsfiddle.net/g36YD/7/ (click on "Zero" on the right).
I've tried put this code, but I don't know which link/tag I can put in the href link, i tried the tag {url_download} but no way to work.
I know that's an external functionality, but I see that others components like jDownloads have that option, so my question is if can be work also on Joomla and how to make it work.

Thank you,
Luca
  •  

ColinM

Hi
I have done a little research on this aspect.
One can get to show a pdf file in an iframe but it becomes browser dependent as now the browser needs its own pdf plugin.  Firefox and Chrome usually have these but many others do not, especially on mobile devices.   Whilst an iframe is used for the document one also wants it to have a dialogue for resizing and so on. If you want to see a reasonable example then look at http://jquery.toitl.com/index.php?p=2012/11/02/134944/dialog_with_pdf  This allows resizing the pdf in the window and dragging the size of the window.

It is unlikely that jD would support because of the need to have a pdf plugin in the users browser. Jd needs toi be as universal as feasible.

What you can do is to get jD to  create an image of the first page of a pdf and use that as if it were an associated picture - see Config -Pictures tab 'Create Thumbnails from PDF files?' field

Colin
Colin M
  •  

mrm92

I like this implementation. I see that jdownloads must be flexible and I agree, but in my site 99% of files ar pdf and my users have latest browsers and have own pdf integration. So I would like to see if this implementation can be done and take care of feedback's users.
But I don't know how can I implement this code in jdownloads, I think some code must be part of template, and some part of layout... but I don't know which parts and how jdownloads can know that must open files with this frame.
Can I have by you a little help to start, if it's possible?
Thanks
Luca
  •  

ColinM

Hi
It would require a significant amount of code changes. Not all modern browsers, especially on mobile devices come with inbuilt PDF support so if would be a solution that causes many complaints.
I will move this topic to Suggestions.
Colin M
  •