Can't load a pdf file into PdfDocumentView

Hello

I can't load a pdf file into PdfDocument object. The error occurs:


Variable path contains pdf file name "file.pdf" and this file is in the application catalog.


5 Replies

RB Rajavignesh BalaSankar Syncfusion Team February 16, 2022 07:09 PM UTC

Hi James,


We tried to reproduce the issue “PDFDocumentView can’t able to load the PDF” in our end, but we could not able to reproduce the reported issue. We have created a simple sample for loading the PDF file with PDFDocumentView and attached in the ticket. Kindly check and modify the attached sample, so that we can able to reproduce the reported issue.


Regards,

Raja Vignesh.


Attachment: WpfPDFViewer_e43b9682.zip


JM jmaren June 21, 2022 05:54 PM UTC

Hi

I am facing the same problem but this is only reproduced when it is generated for .Net 6, but for Net Framework 4... it is correct

I attach a couple of examples, one for each of the platforms.




Attachment: WpfPDFViewer_64c5d749.zip


RB Rajavignesh BalaSankar Syncfusion Team June 22, 2022 05:22 PM UTC

Hi JMaren,


We can be able to reproduce the reported issue on our end with the provided .NET6 Sample. On analyzing the sample further, If we replace the assemblies from NuGet in the provided sample, the PDF gets loaded properly. we found that the modified date of the PDFViewer is alone changed and may be some conflicts may occur. We have also attached the NuGet referred sample below for your reference. Could you please share us that from where the PDFViewer DLL is taken or referred? This information will help us to assist you better on this. Also let us know attached sample working properly ?


Regards,

Raja Vignesh.


Attachment: WpfPDFViewer_64c5d749_4f07f639.zip


DA Dave August 27, 2022 02:48 AM UTC

I am having the same issue, all controls and visual studio are fully up to date, .net 4.8 wpf desktop project.


filePath = @"c:\pdfs\new-file.pdf"; // this is a valid path a to a simple text only, 1 page file i can open

pdfviewer.Load(filePath); get null path error, yet path value is correct in debug/



SS SalmanBaris ShahulHameed Syncfusion Team August 29, 2022 01:30 PM UTC

Hi Dave ,



We tried to reproduce the reported issue on our end with the provided details, but we could not be able to reproduce the issue. Please share the below details to analyze more on this and assist you with a better solution.


1. Stack trace details for the issue.


2. Any restriction was set for document or folder( Kindly share the details).


Regards,

Salman


Loader.
Up arrow icon