jDownloadsownloads.com


Author Topic: Preview of PDF files?  (Read 8105 times)

0 Members and 1 Guest are viewing this topic.

Offline ColinM

  • Moderator
  • *
  • Posts: 3.929
Re: Preview of PDF files?
« Reply #15 on: 22.08.2019 13:05:50 »
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



Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #16 on: 25.08.2019 15:43:20 »
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
« Last Edit: 27.08.2019 13:47:45 by ColinM »

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #17 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'


Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #18 on: 17.02.2020 12:37:13 »
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

Offline ColinM

  • Moderator
  • *
  • Posts: 3.929
Re: Preview of PDF files?
« Reply #19 on: 17.02.2020 15:00:28 »
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

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #20 on: 07.04.2020 15:03:39 »
for who use it already:
It is safe to upgrade to 3.2.67 the core file that i override has not changed.
« Last Edit: 07.04.2020 15:17:42 by Tazzios »

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #21 on: 10.06.2020 17:02:38 »
New version for jdownloads 3.2.68

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #22 on: 11.06.2020 09:23:55 »
updated PDFJS Preview to 2.4.456 and readme file

Offline droogers

  • Newbie
  • *
  • Posts: 7
Re: Preview of PDF files?
« Reply #23 on: 14.08.2020 18:23:45 »
Is there a new version for 3.9.1 ? In the previous version it worked perfect !

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #24 on: 15.08.2020 12:32:35 »
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

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #25 on: 15.08.2020 13:48:13 »
New version for Jdownloads 3.9.1  :D

Offline ColinM

  • Moderator
  • *
  • Posts: 3.929
Re: Preview of PDF files?
« Reply #26 on: 16.08.2020 11:26:27 »
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

Offline droogers

  • Newbie
  • *
  • Posts: 7
Re: Preview of PDF files?
« Reply #27 on: 24.08.2020 11:29:48 »
Is it also working in jDownloads 3.9.2 ?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.929
Re: Preview of PDF files?
« Reply #28 on: 24.08.2020 13:38:10 »
Hi
Not sure yet but I would expect it to be okColin

Offline Tazzios

  • Newbie
  • *
  • Posts: 47
Re: Preview of PDF files?
« Reply #29 on: 28.08.2020 15:57:21 »
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.