fix parent PDF creation, add test