Page 1 of 1

How to link to a file via relative path?

Posted: Thu Feb 06, 2020 6:50 pm
by Adrian
Hello,

i have a question about linking a file to a relative path.
The project have a file publisher where all related files are uploaded at publishing.
The file is in the folder "/pdf/filename.pdf"
If I use somewhere a button with linking a file from my computer, the "file" link is like d:///d:/path/etc" and it's not the desired method.
If I use in the link"/folder/filename.pdf", the path at export is "file:///directory/filename.pdf" and this is also bullshit.

How can i do it correct?

It is important for me to use relative path because it is a "portable" application.

How can i do this?

Thank you.

Many regards, Adrian

Re: How to link to a file via relative path?

Posted: Thu Feb 06, 2020 7:22 pm
by Pablo
All files are stored with an absolute path. This is related to the document storage format (compound) and this cannot be changed.
But if you move the project then the application will automatically update the paths to the current folder.

Re: How to link to a file via relative path?

Posted: Fri Feb 07, 2020 8:01 am
by Adrian
Hello Pablo,

OK, thank you.

I don't understand what you mean with "if you move the project"?

To realize what i need the only way is to edit the code manually, isn't it?

Thank you.

Regards, Adrian

Re: How to link to a file via relative path?

Posted: Fri Feb 07, 2020 10:04 am
by Pablo
i don't understand what you mean with "if you move the project"?
If you copy the project to another location or computer then the internal paths will be updated automatically.
To realize what i need the only way is to edit the code manually, isn't it?
You do not need to edit the code.