The close function is used to close the Pdf object.
close
var pdf = new Pdf("mytemplate.pdf"); pdf.save("my.pdf").close();
pdf. close ( )
void