Dynamically handling pdf filenames