Replaced Poppler < .22 code with a neater™ version