Document Viewer unable to access system files

Community Driven Extensions Project
Post Reply
arunariparambil
Posts: 11
Joined: 28 Mar 2018, 07:55

18 May 2018, 04:35

Hai,
When iam using the following url, unable to access the pdf file from document viewer
<pe:documentViewer id="Document" height="1000" width="1200" url="C:\\Users\\MyReports\\cashreceiptreport.pdf">
</pe:documentViewer>
Is there any way to access files from system drive like C,D...
In advance i appreciate your help and thanks.........

User avatar
Melloware
Posts: 716
Joined: 22 Apr 2013, 15:48

18 May 2018, 13:23

What you are running into is normal web app security. A browser URL cannot access the user's hard drive. You choices are the 3 choices listed in our showcase.

https://www.primefaces.org/showcase-ext ... /basic.jsf

1. Load it as a URL from inside your app.

2. Keep the PDF with your WAR file in /webapp/resources and access it that way.

3. Read it from somewhere "off disk" or "out of a database" and use the StreamedContent option (this sounds like what you want).
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2 / PF Extensions 6.2.7

arunariparambil
Posts: 11
Joined: 28 Mar 2018, 07:55

19 May 2018, 06:10

I got it
thank you sir..

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest