Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Jul 05, 2022 3:32 pm

Hello guys,

I need help creating a new instance of Document with a relative path.

The file is in the same folder as the class, where I'm trying to create the instance.
There is everything with the absolute path but it isn't working with a relative path.

I copied the qualified name from eclipse and inserted it as path.

Do you have any ideas?
What do I have to do to get a relative path working?

Thank you in advance!

geochaecker2
 
Posts: 1
Joined: Thu Feb 17, 2022 12:22 am

Wed Jul 06, 2022 2:21 am

Hello,

Thanks for your inquiry.

Sorry, I'm not familiar with eclipse either, but I also don't think this is an issue with our products.
I suggest you try to open your document (with the same relative path) using java.io.File to verify that this path is correct. As we also need to open this document first when we create a Document instance. If you have any other questions about our products, please feel free to contact us.
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.Doc