automatically flatten pdfs to avoid issues with loading. This may be done with a command line tool like unoconv or ghostscript