
PDFDancer
PDF used to be read-only.
We fixed that.
const pdf = await PDFDancer.open("document.pdf");
const [paragraph] = await pdf.page(1).selectParagraphsStartingWith('Lorem Ipsum');
await paragraph.edit()
.replace('New Text')
.font("Inter", 12)
.lineSpacing(1.3)
.moveTo(100, 400)
.apply();
await pdf.save("output.pdf");