Using the jQuery draggable library to set the coordinates on the images and using the pdf-lib library to set the coordinates on the pdf.