Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Sep 18, 2018 7:42 pm

I am currently working on a WPF application that accepts a .pdf file as an upload. The .pdf file uploads perfectly from the local drive, but fails when loading from a public network drive. My first thought was a permissions issue, but the permissions on that drive are very open since it's a common internal drive. "Everyone" has read/write access.

I have also tried mapping it as a network drive vs manual selection with a fully qualified path just to rule that out.

Any thoughts on what the problem could be?

There's not a whole hell of alot to my code. Not really trying to do anything fancy. Just the following little 3 line block. Fails on line 2.

Spire.Pdf.PdfDocument pdfDoc = new Spire.Pdf.PdfDocument();

pdfDoc.LoadFromFile(ImageLocFilePath);

pdfDoc.SaveToFile(finalPath);

TylerWesche
 
Posts: 1
Joined: Tue Sep 18, 2018 7:22 pm

Wed Sep 19, 2018 7:47 am

Hello Tyler,

Thanks for your inquiry.
If you were using an old version, I suggest upgrading to the latest Spire.PDF Pack(Hot Fix) Version:4.9.4 to try below code. If you encounter an error at ReadAllBytes(), it indicates your issue is caused by your file path, but not caused by our product. If your issue occurs at LoadFromBytes(), please provide your input Pdf file to help us further investigate your issue. You could send them to us via email([email protected]).
Code: Select all
byte[] data = File.ReadAllBytes(ImageLocFilePath);
PdfDocument doc = new PdfDocument();
doc.LoadFromBytes(data);

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1535
Joined: Wed Apr 25, 2018 3:20 am

Wed Sep 26, 2018 9:55 am

Hello Tyler,

Greetings from E-iceblue.
Has your issue been fixed? Thanks in advance for your valuable feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1535
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF

cron