fixing logic for detecting editions in pdf