Page 3 of 3

Re: Preview button forces download for PDF

Posted: 10 Aug 2015, 07:00
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" />

Re: Preview button forces download for PDF

Posted: 11 Aug 2015, 19:55
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

Re: Preview button forces download for PDF

Posted: 12 Aug 2015, 08:17
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.

Re: Preview button forces download for PDF

Posted: 14 Aug 2015, 00:27
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

Re: Preview button forces download for PDF

Posted: 10 Aug 2016, 14:44
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.

Re: Preview button forces download for PDF

Posted: 10 Aug 2016, 15:03
by Jan
OK, díky za info

Re: Preview button forces download for PDF

Posted: 10 Aug 2016, 18:28
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.

Re: Preview button forces download for PDF

Posted: 11 Aug 2016, 23:40
by Jan
Ok

Re: Preview button forces download for PDF

Posted: 21 Jun 2017, 08:11
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

Re: Preview button forces download for PDF

Posted: 21 Jun 2017, 17:12
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