updates to better cpp api use for poppler