pdf: fix to_filename