The command should contain a %f placeholder, which will get replaced by the path to the pdf file. The command may also contain a %s placeholder, which will get replaced by the path to a file containing the print settings in the format produced by gtk.print_settings.PrintSettings.toFile.
The preview application is responsible for removing the pdf file and the print settings file when it is done.