I have to convert a lot of Microsoft Word documents to PDF for my work. It is very important to me to render the formatting as accurately as possible. I successfully installed Office 2010 on Xubuntu 14.04, but there is an issue where I can’t open a document. I can only open a new blank document. So, I have given up there. I then proceeded to search for the most accurate rendering tool for Word to PDF. I looked into online tools such as Zamzar as well as other options. (Unfortunately LibreOffice changes the formatting too much.)
After a few tests, the best rendering I could find was this:
https://view.officeapps.live.com/op/view.aspx?src=
Then you append the URL of the Word document:
https://dl.dropboxusercontent.com/u/4992179/My-Document.docx
Final product:
https://view.officeapps.live.com/op/view.aspx?src=https://dl.dropboxusercontent.com/u/4992179/My-Document.docx
From here I would print to PDF.
As you can see from my link, I would use the Dropbox ‘Public’ folder to be able to get a URL for my document. To get the URL in the Public folder you right click on the file and select ‘Copy public link.’
I would like to streamline this process as much as possible because I have to do it a lot. I am trying to find the best way to do so. I would like to create a script that runs the following:chromium-browser https://view.officeapps.live.com/op/view.aspx?src=Variable-Representing-Current-Content-Of-Clipboard
The current content of the clipboard when I click on the script will be the Dropbox link to the Word document file.
(I am unable to make a bookmark to the https://view.officeapps.live.com/op/view.aspx?src= section of the URL and then just go to the address bar and paste the Dropbox link after because the officeapps URL automatically forwards to another.)
If anyone has any other ideas, I am certainly open to them and appreciative.
Much thanks in advance.
Best Answer
Nautilus script solution
It wouldn't be too difficult to grab the clipboard contents and work with them, but I can do you one better. The following Nautilus script will open any supported document via Microsoft Office Online. It does so by first copying the document to your public Dropbox folder (if it wasn't there before) and subsequently passing the public URL to the web service:
Configuration
There are two important settings that govern how the script operates:
DbPath
sets the path to your Dropbox folder. This is~/Dropbox
by default. Please make sure to chage the setting if you've moved your DB folder.CopyToDb
controls whether or not to copy files to thePublic
folder if they're located somewhere else in the file system.This option is on by default (
yes
). If you disable it (no
) the script will only handle files in your public Dropbox folder.Installation instructions
As this is a Nautilus script, you can use the following generic instructions to install it on your system:
How can I install a Nautilus script?
Hope this is what you were looking for!