Document Viewer unable to access system files

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

18 May 2018, 04:35

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">
Is there any way to access files from system drive like C,D...
In advance i appreciate your help and thanks.........

User avatar
Posts: 993
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. ... /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:
PrimeFaces Elite 6.2.10 / PF Extensions 6.2.9

Posts: 24
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