News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Preview of PDF files?

Started by Jean-Pierre, 27.10.2015 22:59:44

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ColinM

Hi
Yes a distinct improvement.  What I would suggest initially is to make this as a component override - could you do this ?  I would test out and produce some examples, document and so on. The size parametersmight need to be max-size type or percentages which we could experiment with.

Adding in the pdfjs viewer as part of the jD install would obviously be a good idea and simplify matters.  But as present we are working very much on the next major release of jD (called v3.9) so in my opinion that would be the best time to include the viewer in the jD installation. - and make the facility a feature?   

Users might want to just show a section of the pdf so is it a possiblility to specify the number of pages or even better the page range?  At this time it looks like 4 or 5 parameters in the Back End would be needed for inclusion in the jD config.xml file, probably the Specials section.First "Do you wish to use embedded pdf viewer?" with a Yes/No selection The Yes would then reveal the pages and size parameters. 

I would suggest a suitable place to load the viewer file would be in a new directory in the components/com_jdownloads/assets called say pdfjs although perhaps it could go into the existing js directory.
What do you think?Colin


Colin M
  •  

Tazzios

#16
I tried to make an override as instructed here: https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
But it didn`t work.

I made an zip with al the files that i have adjusted  and just overwrite the default files.
It also includes the adjustments of the related module and smartsearch that i found on github so maybe not so usefull for others.
Edit removed Download zip attachment

Tazzios


PDF Preview update for Jdownloads 3.2.66. Now using template override, no config needed and smaller installation (if you remove the additional language from pdfjs  you can make it even 1MB smaller).

Install
Unzip the files place the 'component' folder in your joomla root, this contain the pdfjsviewer
Place the file from the 'TEMPLATE' folder in your active template.

How to use
Add {file_pdfviewer} to the layout 'download details'


Tazzios

Quote from: Tazzios on 16.02.2020 16:04:27
PDF Preview update for Jdownloads 3.2.66. Now using template override, no config needed and smaller installation (if you remove the additional language from pdfjs  you can make it even 1MB smaller).

Install
Unzip the files place the 'component' folder in your joomla root, this contain the pdfjsviewer
Place the file from the 'TEMPLATE' folder in your active template.

How to use
Add {file_pdfviewer} to the layout 'download details'
Removed build folder was also needed. removed a double '/'  in the url

ColinM

Hi Tazzios
Would be pleased to add to documentation, but I need to clarify a few points.  So I will send you a message.Colin
Colin M
  •  

Tazzios

#20
for who use it already:
It is safe to upgrade to 3.2.67 the core file that i override has not changed.

Tazzios

New version for jdownloads 3.2.68

Tazzios

updated PDFJS Preview to 2.4.456 and readme file

droogers

Is there a new version for 3.9.1 ? In the previous version it worked perfect !
  •  

Tazzios

I`m currently  trying to upgrade to 3.9.1 but running into some problems. After that i will make a version for 3.9

Tazzios

New version for Jdownloads 3.9.1  :D

ColinM

Tazzios
Thanks for the jd3.9 version  Now we have 3.9 version I am keen to get the PDF 'preview' in place
Will send you a PM
Colin
Colin M
  •  

droogers

Is it also working in jDownloads 3.9.2 ?
  •  

ColinM

Hi
Not sure yet but I would expect it to be okColin
Colin M
  •  

Tazzios

did not have time to check yet but in the readme.txt is a (very short/cryptic) instructions to update it by yourself if needed.