I am operating on a
RPi Model 3B with
Jessie OS and
Python version 2.7.9.
I am using
XlsxWriter (ver1.1.0) to write an
.xlsx file and then converting it to
LibreOffice's conversion code, as follows:
libreoffice --headless --convert-to pdf /path/to/file.xlsx
I wrote hyperlink to a picture file using
write_url() with URL argument which is just a 'Photo Name' in my case. The pictures files are located in the same directory alongside with the converted
When I open these files on my
RPi, the hyperlinks have the correct path to the files and are clickable and they work in the default viewers
When opening these files on a
Windows 7 machine using USB drive, Excel interprets the path correctly and can open the file but PDF viewers such as Adobe Reader and FoxIt cannot open it.
They interpret the hyperlink as Linux hyperlink as follows:
'/media/folderName/etc/' instead of looking into the letter drive that Windows assigns to the USB like Excel can.
Excel knows how to look in the associated drive letter of the USB drive but it seems like PDF viewers are lost. I understand that this is most likely a problem with the fact that Linux and Windows can find external drives differently.
I turned this around by explicitly typing the entire file path including the drive letter of my particular drive, but obviously this doesn't work for different drives and if the user copy the folder with the files somewhere else. The resulting PDF when saving as PDF in Excel works, however this isn't a feasible workaround in my situation.
Is there any way to get PDF viewers to find the correct path? Or a Linux to Windows URL conversion that will work for both?