Error creating pdf file from url