We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PDF viewing requires admin rights ?

Thread ID:

Created:

Updated:

Platform:

Replies:

147075 Aug 30,2019 07:24 PM UTC Oct 29,2019 01:14 PM UTC WinForms 7
loading
Tags: PdfViewer
Simon Cousins
Asked On August 30, 2019 07:24 PM UTC

I've been building an application for a few weeks with various content viewers, i.e. PDF Viewer, Excel Viewer, etc.  It seems that the use of these components requires the application to be running as a full local administrator.  Without admin rights there is just a spinning loading icon.  Restarting the same application and viewing the same file under admin rights views the document.

Is this by design or is there a configuration I can change to allow the PDF Viewer (+ other Syncfusion viewers) to work as a standard Windows user?

Thanks in advance !

Uthandaraja Selva Sundara Kani [Syncfusion]
Replied On September 2, 2019 01:19 PM UTC

Hi Simon, 
Greetings from Syncfusion. 
We are unable to reproduce the reported issue “PDF viewer requires admin rights” from our end. We have created video for the same and it can be downloaded from below location, 
Kindly share the following details to analyze more on this issue and assist you with the better solution, 
1.       Replication procedure to reproduce the issue 
2.       Essential Studio version 
3.       .Net Framework 
4.       Operating System 
5.       Visual Studio version 
 
Regards, 
Uthandaraja S 


Simon Cousins
Replied On October 25, 2019 11:53 PM UTC

I had disabled the Syncfusion PDF toolbar for the PDFViewer control and so as a test I re-enabled it.  When I did that I can now see a blue error message bar that was never shown before.  The error message is "Unable to load DLL 'Pdfium.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)".  Working on trying to address that now.

Simon Cousins
Replied On October 26, 2019 12:11 AM UTC

I had disabled the Syncfusion PDF toolbar for the PDFViewer control and so as a test I re-enabled it.  When I did that I can now see a blue error message bar that was never shown before.  The error message is "Unable to load DLL 'Pdfium.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)".  Working on trying to address that now.

Update : So, locating and moving pdfium.dll into the application directory for the main EXE file resolved the issue.  Is pdfium.dll a part of the Syncfusion PDFViewer requirements or is it an unrelated remnant from somewhere else in my project ?

Simon Cousins
Replied On October 26, 2019 01:33 AM UTC

OK, so...  C:\Program Files (x86)\Syncfusion\Essential Studio\FileFormats\17.1.0.38\Pdfium\x64 contains pdfium.dll so obviously bundled with the product.  Strange thing is that when I create the Release output of my solution a folder called ....\Pdfium\x64 is created, with the pdfium.dll file in it.  So, I forced a copy of pdfium.dll into the same directory as the other Syncfusion files (instead of the subfolder) and the PDFViewer now renders without admin rights.  Odd that the viewer works when the pdfium.dll file is in ....\Pdfium\x64 but not when a non-admin. 

Deepak Gunasekaran [Syncfusion]
Replied On October 28, 2019 07:24 AM UTC

Hi Simon, 

In the version 16.3 and above, Pdfium dlls are embedded in the PdfViewer assemblies and the Pdfium dlls will be extracted in the application folder at the run-time (i.e.,) in the release output of the solution as you have mentioned. We suspect that the issue occurred, due to non-admin does not have write permission to the application folder as it restricts the generation of Pdfium dlls in the application folder. In this case, kindly enable the write permission to the non-admin to get the issue resolved. 

Alternatively, if you do not wish to provide write permission to the application folder for non-admin, you can avoid generating the Pdfium dlls in the application folder (or) redirect the extraction of Pdfium assemblies in the custom path (in which the write permission is granted) by setting the ReferencePath property. 
PdfViewerControl pdfViewerControl = new PdfViewerControl();  
pdfViewerControl.ReferencePath = @"D:\ReferencePath\";  
pdfViewerControl.Load("Sample.pdf");  
  
Note: In the run time, PDF viewer will check the custom path provided in the ReferencePath property. If you already placed the Pdfium dlls in the custom path as mentioned in the UG link (https://help.syncfusion.com/windowsforms/pdfviewer/how-to/use-pdfium-rendering-engine), it will refer the already available dlls from the location without generating the dlls. 

Kindly try the above solutions and let me know if it resolves the issue at your end. 

Regards, 
Deepak G 


Simon Cousins
Replied On October 28, 2019 11:49 AM UTC

With regards to the ReferencePath...  is that an assumed writable folder that is outside of my application folder ?  Could that be a folder referenced as Application.StartupPath & "\SyncFusion Reference Path" and the permissions read-only ?

Uthandaraja Selva Sundara Kani [Syncfusion]
Replied On October 29, 2019 01:14 PM UTC

Hi Simon, 

Please find the details below. 
 
With regards to the ReferencePath...  is that an assumed writable folder that is outside of my application folder? 
The ReferencePath folder is not necessary to be a writable folder, if the Pdfium dlls are already placed in that folder. Otherwise, we need to provide write permission for the same. 

There is no restriction in the path of the folder. It can be either outside or inside of your application folder.  

Could that be a folder referenced as Application.StartupPath & "\SyncFusion Reference Path" and the permissions read-only ? 
Yes, the ReferencePath folder can be referenced as Application.StartupPath & "\SyncFusion Reference Path" with the read-only permission. 

Note: As we mentioned earlier, if the Pdfium dlls are already placed in the ReferencePath, then it is not necessary the ReferencePath should have write permission. 

 
Please let us know if you need further assistance. 

Regards,   
Uthandaraja S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon