„Save as“ dialog for cups-pdf

I use Linux Mint Rebecca Xfce with Libreoffice.
I found no way how to export a single sheet to PDF in calc.
So I decide to install cup-pdf. The printing of single sheets now worked fine,
but I dont want to copy each PDF-file to its needed location.
I wonder, that I don’t find a solution for a simple „Save as“ dialog.
So I wrote one.
It’s not „the hight art of programming“, but it is simple and it works.

How it works
A small python-script triggers the PDF folder in the home folder.
When a PDF file is printed in the PDF folder it starts a standard GTK „Save as“ dialog.
So make sure there are no PDF files in the folder after installation or you will
get more fun with the „Save as“ dialog as you expect. 😎
After the OK button is pressed, the PDF file will be copied to its new location and the
source document will be removed.
When a document already exists a overwriting dialog will be shown.
Errors are handled (e.g. permisson denied) and the document can be saved at a different
location.
By clicking the cancel button, the document will be deleted.

System requirements
cups-pdf (it would make no sence without)
pygtk >= 2.0
gtk >= 2.8

I tested on Linux Mint 17.1 Rebecca Xfce, Ubuntu Mate 14.04.1 and crunchbang Waldorf (debian derivate).
It worked out of the box, without installing any extra packages,

Installation

Download savpdfGTK.tar.gz

Install cups-pdf if not already done.
sudo apt-get install cups-pdf

After the first printing to PDF Printer the folder PDF will be created in your home folder

Go to the folder where you have downloaded the savpdfGTK.tar.gz (e.g. /Downloads) and extract it.
tar -zxvf savpdfGTK.tar.gz

Change to the folder savpdfGTK
cd savpdfGTK

Copy the file savpdf to /usr/local/bin/.
sudo cp savpdf /usr/local/bin/

Change permissions of savpdf
sudo chmod 755 /usr/local/bin/savpdf

Enable the start of the script at login for all user
You will find the entry in the session and startup menu (Mint Xfce)
sudo cp savpdf.desktop /etc/xdg/autostart/

Change permissions of savpdf.desktop
sudo chmod 644 /etc/xdg/autostart/savpdf.desktop

After installation log out of the xsession and make a new login.
You can also reboot if you want.

License
BSD 2-Clause
Short: Take it for free and do with it what you want, but don’t sue me.