fixed bug in pdfToHtml function when attaching new pdf to an item