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.

Fri Sep 07, 2018 7:20 pm

I am using the free version 4.3.0.200.40

When I use LoadFromFile to open a file on a read-only share I get the error:
Access to the path '\\\\ABCSRV73\\Documents\\PDF\\r02596-h.pdf' is denied.

The code works with other files and I can read the file using Adobe Acrobat Reader.
I tried to use LoadFromStream but that function is not in the DLL.

My code (modified for testing):

doc.LoadFromFile( filename ); // fails

// Testing...
using( FileStream pdf_in = File.OpenRead( filename ) )
{
// doc.LoadFromStream( pdf_in ); // LoadFromStream does not exist

// This works correctly
long length_in = pdf_in.Length;
byte[] bytes_in = new byte[length_in];
int bytes_read = pdf_in.Read( bytes_in, 0, (int)length_in );
Console.WriteLine( "Length={0} Read: {1}", length_in, bytes_read );
}

Do you have any suggestions on how to work around this issue?
Thanks,

Peter.Fry
 
Posts: 1
Joined: Tue Jan 30, 2018 7:13 pm

Mon Sep 10, 2018 8:26 am

Dear Peter,

Thanks for your inquiry and sorry for late reply as weekend.
The LoadFromStream method is contained in our commercial version (Spire.PDF Pack(Hot Fix) Version:4.8.14), and I tested that loading a file from read-only share with the commercial version has no problem. Please upgrade to the commercial one to have a test. If there is any question, welcome to write back.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu Sep 13, 2018 9:47 am

Hello,

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

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF