Extract the injectIntoPDF() method