
Insertar marca de agua a un pdf
Source (link to git-repo or to original if based on someone elses unmodified work):
Instrucciones:
Instalar la librería PDFTK.
Generar un archivo PDF que contendrá la marca de agua. La recomendación es diseñar un logo con cierta "transparencia" pués este gráfico se superpondrá sobre otro documento.
Copiar el script en la carpeta /home/$USER/.gnome2/nautilus-scripts (Dónde $USER es tu usuario).
Ejecutar y seguir instrucciones.
Versión 0.2.
Cambiada la opción background por stamp en insertar marca de agua.
Corrige que al insertar una marca de agua en un pdf que contiene sólo imagen y no texto, la marca de agua quedaba por detrás y no se veía.
Al ser un sello (algo que va por encima), el gráfico a utilizar como marca de agua debe tener transparencia (los jpg no la soportan...utiliza por ejemplo el formato nativo de Gimp e imprime desde el propio Gimp a PDF)...
En unos días incluiré dos opciones para la marca de agua, stamp (marca de agua encima), background (Marca de agua por debajo...de esta manera da igua que sea transparente o no, sólo hay que jugar con el brillo y constraste, más fácil para aquellos no familiarizados con el trabajo fotográfico).
Entre tanto ofrezco la opción stamp/background, puedes editar el archivo y reemplazar
pdftk "$FILE" stamp "$FILE2" output "$salida"
por
pdftk "$FILE" background "$FILE2" output "$salida"
Ratings & Comments
6 Comments
Agradezco las aportaciones que habéis hecho, en especial las traducciones. La verdad es que más o menos me puedo manejar en inglés y que pensaba traducirlas no tardando, pero prefiero como ha sido el caso, que alguien nativo lo haga. He recogido la sugerencia de montar todos los scripts en uno solo, podéis encontrarlo un poco más arriba e igualmente agradezco cualquier tipo de colaboración. Reitero... por la cantidad de scripts que he ido dejando, que no me mueve nada de tipo comercial (hacer spam) ni nada que se le parezca... simplemente me he encontrado con una serie de dificultades a la hora de trabajar con archivos PDF bajo entornos Linux y he intentado darle solución como personalmente entendía y podía (más que nada porque me daba cierto asc* tener que hacer nada con win**** y vía terminal se me hacía un poco más pesado (aunque menos que con win$%&%" jejejeje)).
Iḿ going to make more scripts related to PDFTK and I think... at least for the moment is better to have them available while I do the whole pack. Iḿ not interesting in spamming any homepage.... you can rub the links to feteugt-cyl...it was only for completing my personal information.
#!/bin/sh # Desarrollado por Gustavo Báez Moreno # Uebersetzt von uogak FILE=`zenity --file-selection --title="pdf-Datei auswählen, die ein Wasserzeichen erhalten soll."` case $? in 0) echo "\"$FILE\" ausgewählt.";; 1) echo "Keine Datei ausgewählt.";; -1) echo "Keine Datei ausgewählt.";; esac zenity --info \ --text="Als nächstes wird ein Dialog nach der Datei fragen, die das Wasserzeichen enthält. Die Datei muss eine pdf-Datei sein, das Script funktioniert nicht mit einem jpg-Bild. " FILE2=`zenity --file-selection --title="pdf-Datei auswählen, die das Wasserzeichen bereit stellt."` case $? in 0) echo "\"$FILE2\" ausgewählt.";; 1) echo "Keine Datei ausgewählt.";; -1) echo "Keine Datei ausgewählt.";; esac salida=$(zenity --file-selection --save --confirm-overwrite);echo $salida pdftk "$FILE" background "$FILE2" output "$salida"
#!/bin/sh # Desarrollado por Gustavo Báez Moreno # Translated by uogak FILE=`zenity --file-selection --title="Select the pdf-file that should receive the watermark"` case $? in 0) echo "\"$FILE\" selected.";; 1) echo "No file selected.";; -1) echo "No file selected.";; esac zenity --info \ --text="Next, you will be asked to select a file that contains the watermark. The file has to be a pdf-file, a jpg-file will not work." FILE2=`zenity --file-selection --title="Select the pdf-file that provides the watermark"` case $? in 0) echo "\"$FILE2\" selected.";; 1) echo "No file selected.";; -1) echo "No file selected.";; esac salida=$(zenity --file-selection --save --confirm-overwrite);echo $salida pdftk "$FILE" background "$FILE2" output "$salida"
A simple script using PDFTK which inserts a watermark in another PDF document PDF. Instructions: Install the library PDFTK. Generating a PDF file containing the watermark. The recommendation is to design a logo with some "transparency"; as this figure is superimposed on another document. Copy the script into the folder / home / $ USER/.gnome2/nautilus-scripts (Where $ USER is your user). Run and follow directions.
Couldn't you make only one and name it PDF tools? This way it takes three lines under nautilus-scripts link. Please, select one of your home pages and make it hold all three of your scripts. Thank you!