#!/bin/sh

####################################################
#Visite o meu blog: http://ubuntued.blogspot.com/  #
####################################################

nome=$( zenity --entry --text="Digite a password do ficheiro" --title="Password?")

if [ $? = 0 ]
	then
		pdftops -upw $nome $@ cenas.ps
		nomefinal=$(echo $@ | awk -F".pdf" '{ print $1 "_new.pdf"}')

		ps2pdf cenas.ps $nomefinal
		rm cenas.ps

fi

