Closed (cannot reproduce)
Project:
PDF
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
16 May 2013 at 16:00 UTC
Updated:
16 Aug 2018 at 07:14 UTC
Jump to comment: Most recent
hello,
How I config this module to show pdf file that is privated.
tnks.
Comments
Comment #1
h.arefmanesh commentedComment #2
shenzhuxi commentedI think I fixed this issue. If I remember incorrectly, please re-open this issue.
Comment #4
anjjriit commentedReally sorry to re-open this issue.
Right now user can view my PDF files stored in private folder, but in my case if user accessed file directly from url,
http://mysite/system/files/pdf-stored-in-private-folder.pdf.When i use Private files download permission module, user can not access file directy frum url, but they are can not view my PDF also.
I do not know this is drupal issue or pdf issue.
Thank in advance
Comment #5
anjjriit commentedReally sorry to about my wrong, I mean to re-open, but i post new comment in #4
Comment #6
zwerg commented+1
Comment #7
shenzhuxi commented@anjjriit Do you mean:
http://mysite/system/files/pdf-stored-in-private-folder.pdf can be accessed, but pdf.js viewer doesn't work. (I just checked. Pdf module is working with private files.)
or
http://mysite/system/files/pdf-stored-in-private-folder.pdf can't be accessed, and pdf.js viewer doesn't work. (That's privat file/permission problem.)
Comment #8
zwerg commentedIn my case (using private file system), pdf.js can show a private pdf file but the visitor can access it directly via url.
Comment #9
anjjriit commentedThanks for @shenzhuxi
Yes you right When i use Private files download permission module,
http://mysite/system/files/pdf-stored-in-private-folder.pdf can't be accessed, and pdf.js viewer doesn't work. (That's privat file/permission problem.)
My goal when i used private folder are:
1. pdf.js viewer is work.
2. User can not access the file directly from url
I want to user only view file using pdf.js but do not allowed to download or access it directly from url.
Is it possible ?
Thanks
Comment #10
shenzhuxi commented@anjjriit It's impossible. If users can view a file, they can access it.
You can try file viewer module which can convert pdf into png files.
Comment #11
shablm commented@anjjriit, how did you solve this?
I have 'Private files download permission' module configured to let view/download pdf files to certain users only. This works well in my Test server, but not in live.
I mean, The module lets the users view the pdf based on the perm configured, but does not display the contents of the pdf.
I get "pdf document might not be displayed correctly" message in the browser.
How do I fix this?
SOLUTION: SELinux permissions was the issue in my case.