nielsmh's fix for PDF fetching and the example using it