Silly as it might sound, try, using ghostscript, running pdf2ps, then ps2pdf, then pdf2ps again. Since ghostscript tends to run with errors, the offending code might just get deleted.
There are now many programs that create pdf files, but not all of them follow all the Adobe rules.