Added generics to PDFResources, also changed HashSet -> LinkedHashSet to make PDF output more deterministic