In Gnome 3, one can put custom executable scripts to ~/.local/share/nautilus/scripts and they will be accessible via the context menu.
This repository some scripts that allow to work with pdf files: convert (images) to pdf, merge several pdf files into one, and compress pdf files.