Adds Sort by PDF function