Preview button forces download for PDF

Phoca Download - download manager
nagendra
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 15 Apr 2010, 15:32

Re: Preview button forces download for PDF

Post by nagendra »

HI Phoca Hero, I found that if we can embed below code inside modal box window can resolve the issue but i don't know where i have to alter the code. I don't hv much knowledge in PHP or script. I will be thankful if you can guide me with line number & code. I am using joomla 2.5 version & phoca download 2.1.5 V.
<embed src="MyFile.pdf#toolbar=0&scrollbar=0&navpanes=1" width="530" height="300" />
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Preview button forces download for PDF

Post by Jan »

Hi, not sure if I understand correctly?

The preview does not include any php code - in category view, you can link directly the PDF which is then displayed in modal - but in the modal - only the pdf file is displayed, there is no php code :idea:

Jan
If you find Phoca extensions useful, please support the project
nagendra
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 15 Apr 2010, 15:32

Re: Preview button forces download for PDF

Post by nagendra »

Hi, Thanks for your prompt support :-). If we can remove visibility:visible or visibility as hidden(( <viewer-toolbar id="toolbar")) as attached, It will resolve the issue. :cry: please suggest.Image.

Sharing path of image ( if not displaying) : https://drive.google.com/file/d/0B0J-ps ... 2M/preview

Thanks once again.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Preview button forces download for PDF

Post by Jan »

Hi, but unfortunately, I cannot say which part is producing this, if the browser, then I think, there is no way to remove it :idea: :-(

Jan
If you find Phoca extensions useful, please support the project
Alfan
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 10 Aug 2016, 14:39

Re: Preview button forces download for PDF

Post by Alfan »

Hi Jan, when I install extension for Chrome named "PDF Viewer", preview is working well, but download is not working.
I think that problem is in setting in Chrome for PDF files.

Ahoj Honzo, když jsem nainstaloval rozšíření pro Chrome "PDF Viewer", tak ten náhled fungoval korektně, ale nefungovalo stahování. Myslím si, že problém je v Chrome, v zobrazování souborů *.pdf.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Preview button forces download for PDF

Post by Jan »

OK, díky za info
If you find Phoca extensions useful, please support the project
Alfan
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 10 Aug 2016, 14:39

Re: Preview button forces download for PDF

Post by Alfan »

Pak mi to nedalo a odinstaloval jsem Chrome a nainstaloval znovu a uz to funguje korektne. A nemam nainstalovane zadne Rozsireni Chrome.
Takze jsem mozna ja a asi i nekdo, kdo mel problem (drive), neco v Chrome.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Preview button forces download for PDF

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
nagendra
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 15 Apr 2010, 15:32

Re: Preview button forces download for PDF

Post by nagendra »

Hi Jan, I am using this component since 3 years with out any issues but still i have the same concern pending. How to restrict download, to a pdf file inside modal window. I tried to upload a pdf file by removing tool bar and menu bar by thinking i can protect but when i put mouse cursor on file inside modal window download icon appearing and allowing to download. Please suggest.
Regards,
Nag
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Preview button forces download for PDF

Post by Jan »

Hi, sorry, I don't understand. When the PDF is displayed for the user then it is located on user's computer yet (the download button inside PDF program just moves the PDF from temporary location on user's PC to location set by user)

To prevent downloading PDFs, use two versions of PDF - one full for download, second e.g. only table of contents for previewing. This is why there are two folders for storing downloadable and previewable files on the server (one can be accessed by web, second e.g. behind public_html not)
https://phoca.cz/documents/17-phoca-dow ... tml-folder
Jan
If you find Phoca extensions useful, please support the project
Post Reply