fixed newspdf sources not valid in some cases