I also had some problems, specifically with GIF files. The problem was in the baseline code that I started with. My final solution was to convert all GIF fiels to PNG-8 files, and then the problem went away.
When I looked at your reference URL, the PDF link did nothing.