- Posts: 5
- Thank you received: 0
Custom pdf file viewer.
- FURIO PETROSSI
- Topic Author
- Offline
- New Member
-
Less
More
2 months 3 days ago - 2 months 3 days ago #172002
by FURIO PETROSSI
Custom pdf file viewer. was created by FURIO PETROSSI
Mozilla PDF.js viewer or the pdf viewer of your browser, or other similar viewer,js is often used.
Allow the use of an external viewer that points directly to the document's URL on the website
such as
would allow for greater modularity.
Furio Petrossi
Allow the use of an external viewer that points directly to the document's URL on the website
such as
www.mysite.com / pdfview / web / viewer.html ? file = /mydir /mysubdir /mydoc.pdf
would allow for greater modularity.
Furio Petrossi
Last edit: 2 months 3 days ago by FURIO PETROSSI.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Away
- Administrator
-
Less
More
- Posts: 13114
- Thank you received: 1708
2 months 3 days ago #172005
by Mr. Dam
Replied by Mr. Dam on topic Custom pdf file viewer.
Dear Furio Petrossi,
Thank you for your valuable feedback.
You're absolutely right that using an external PDF viewer like Mozilla PDF.js via direct URLs can provide more modularity. However, this method also poses potential security risks. In order to use viewer.html and its related files directly, the corresponding folders must be made publicly accessible. This requires adjusting site security settings to allow unrestricted access to those directories, which can be quite dangerous.
That’s why, with the new PDF viewing method in EDocman 2.0, we have moved away from the older plugin-based approach. The current implementation eliminates the risk of attacks through external viewer folders. In our new system, only specific file types like PDF and DOCX are uploaded into the /edocmanviewer folder in the site root and can be accessed directly. All other file types are blocked from direct access, enhancing security significantly.
We hope this clarifies the reason behind the change. Please let us know if you have further questions or suggestions.
Thanks
Dam
Thank you for your valuable feedback.
You're absolutely right that using an external PDF viewer like Mozilla PDF.js via direct URLs can provide more modularity. However, this method also poses potential security risks. In order to use viewer.html and its related files directly, the corresponding folders must be made publicly accessible. This requires adjusting site security settings to allow unrestricted access to those directories, which can be quite dangerous.
That’s why, with the new PDF viewing method in EDocman 2.0, we have moved away from the older plugin-based approach. The current implementation eliminates the risk of attacks through external viewer folders. In our new system, only specific file types like PDF and DOCX are uploaded into the /edocmanviewer folder in the site root and can be accessed directly. All other file types are blocked from direct access, enhancing security significantly.
We hope this clarifies the reason behind the change. Please let us know if you have further questions or suggestions.
Thanks
Dam
Please Log in or Create an account to join the conversation.
- FURIO PETROSSI
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
2 months 3 days ago #172012
by FURIO PETROSSI
Replied by FURIO PETROSSI on topic Custom pdf file viewer.
Thank you, very good. Safety is important.
My database includes about 26GB of data in 1500 files.
I see that the searched documents are transferred to the Root/edocmanviewer folder.
How long do they stay there? because the website is in a host that allows me only 50GB of space, so the functionality of the site is ensured by a balanced use of resources.
Thank you!
Furio
My database includes about 26GB of data in 1500 files.
I see that the searched documents are transferred to the Root/edocmanviewer folder.
How long do they stay there? because the website is in a host that allows me only 50GB of space, so the functionality of the site is ensured by a balanced use of resources.
Thank you!
Furio
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Away
- Administrator
-
Less
More
- Posts: 13114
- Thank you received: 1708
2 months 3 days ago #172013
by Mr. Dam
Replied by Mr. Dam on topic Custom pdf file viewer.
Dear Furio,
Thank you for your message and for your focus on safety and resource management.
We understand your concern regarding the storage in the Root/edocmanviewer folder. To address this, we are implementing a solution that will automatically delete all documents in that folder at the beginning of each new day. This will help keep your hosting usage under control and ensure the smooth operation of your website.
We will notify you once this cleanup mechanism is active.
Best regards,
Dam
Thank you for your message and for your focus on safety and resource management.
We understand your concern regarding the storage in the Root/edocmanviewer folder. To address this, we are implementing a solution that will automatically delete all documents in that folder at the beginning of each new day. This will help keep your hosting usage under control and ensure the smooth operation of your website.
We will notify you once this cleanup mechanism is active.
Best regards,
Dam
The following user(s) said Thank You: FURIO PETROSSI
Please Log in or Create an account to join the conversation.
- FURIO PETROSSI
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 5
- Thank you received: 0
1 month 18 hours ago - 2 weeks 5 days ago #172384
by FURIO PETROSSI
Replied by FURIO PETROSSI on topic Custom pdf file viewer.
A little note
Since the security issue has been resolved using the directory Root/edocmanviewer, if one does not want to load pdf.js even in a minimal version, it is possible to use pdf.js from Mozilla, similarly to what is done for the Google viewer.
My problem is the following: the Google viewer allows displaying PDF files smaller than 21MB, while the edocman viewer only displays the image of the PDF file and does not allow text search.
Mozilla does not have these limitations.
To allow direct viewing from Mozilla, I had to change .htaccess by adding
<FilesMatch ".(pdf)$">
Header set Access-Control-Allow-Origin " mozilla.github.io "
</FilesMatch>
or
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin " mozilla.github.io "
</IfModule>
this way I can view the file mozilla.github.io/pdf.js/web/viewer.html...rt01-21marzo2025.pdf
Best wishes
Furio
Since the security issue has been resolved using the directory Root/edocmanviewer, if one does not want to load pdf.js even in a minimal version, it is possible to use pdf.js from Mozilla, similarly to what is done for the Google viewer.
My problem is the following: the Google viewer allows displaying PDF files smaller than 21MB, while the edocman viewer only displays the image of the PDF file and does not allow text search.
Mozilla does not have these limitations.
To allow direct viewing from Mozilla, I had to change .htaccess by adding
<FilesMatch ".(pdf)$">
Header set Access-Control-Allow-Origin " mozilla.github.io "
</FilesMatch>
or
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin " mozilla.github.io "
</IfModule>
this way I can view the file mozilla.github.io/pdf.js/web/viewer.html...rt01-21marzo2025.pdf
Best wishes
Furio
Last edit: 2 weeks 5 days ago by FURIO PETROSSI.
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Away
- Administrator
-
Less
More
- Posts: 13114
- Thank you received: 1708
1 month 10 hours ago #172389
by Mr. Dam
Replied by Mr. Dam on topic Custom pdf file viewer.
Hi Furio,
Thank you for the suggestion. I will include the necessary update to the .htaccess file in the next version of EDocman to support viewing PDFs with Mozilla's PDF.js viewer.
Best regards,
Dam
Thank you for the suggestion. I will include the necessary update to the .htaccess file in the next version of EDocman to support viewing PDFs with Mozilla's PDF.js viewer.
Best regards,
Dam
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.