External pdf relative path

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Andrea C
Posts: 9
Joined: Fri Jan 27, 2017 11:40 am

External pdf relative path

Unread post by Andrea C »

Hi,
i'm publishing the manual and i have a problem.
I have a lot of external pdf file linked into the manual and i have to set all the path to relative to the exported folder.
How can i do this?

thanks
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: External pdf relative path

Unread post by Tim Green »

Hi Andrea,

The answers to your questions depend on the following factors:
  • What is your output format (WebHelp, PDF, CHM etc...)?
  • Where is your help going to be stored when it is accessed?
  • How are your "external pdf file linked into the manual"??
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Andrea C
Posts: 9
Joined: Fri Jan 27, 2017 11:40 am

Re: External pdf relative path

Unread post by Andrea C »

- Output format: WebHelp
- Good question, i dont know exactly. I suppose it could be located in local machine or on a shared server.
- They are linked via weblink:
Image
User avatar
Tim Green
Site Admin
Posts: 23181
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: External pdf relative path

Unread post by Tim Green »

Hi Andrea,

Thanks for the information. Weblinks are the right choice here. The easiest solution is to put the PDFs you are linking to in the same folder as the WebHelp, then the reference you show in your screenshot will work without changes. Otherwise you need to add the path to the file relative to the location of the WebHelp on the server, NOT to or on your computer (which won't be accessible when the users access the help). You also need to upload the PDF files you are linking to to the server yourself.

If the PDF files are stored on the same web server you can use relative paths to their folders. For example, if the PDF files are in a sub-folder called PDF in the folder above the folder containing the WebHelp, the path would be:

../PDF/filename.pdf

The two dots and / say "go up one level", then you add the name of the folder. If you needed to go up two levels you would enter:

../../PDF/filename.pdf

If the PDF files are in a folder called PDF inside the same folder as the WebHelp you would reference it like this:

./PDF/filename.pdf

One dot and / says "start at the current folder". You then need to add the names of the folders you need to traverse to get to the folder you are referencing. For example if it is in PDF inside another folder called FILES you would enter:

./FILES/PDF/filename.pdf

If the PDF files are not on the same server as the WebHelp you need to enter the full URL, known as an absolute URL, like this:

Code: Select all

http://www.yourdomain.com/FILES/PDF/filename.pdf
You must include the http:// or https:// prefix, otherwise it won't work. (Browsers do that for you automatically, but in source code you must enter it yourself.) I entered this as code, otherwise it would be turned into a live link on the forum.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Andrea C
Posts: 9
Joined: Fri Jan 27, 2017 11:40 am

Re: External pdf relative path

Unread post by Andrea C »

Thank you very much!
Exactly what i need! :)
Post Reply