pdffillerjs / pdffiller

Take an existing PDF Form and data and PDF Filler will create a new PDF with all given fields populated.
MIT License
286 stars 113 forks source link

value can be null or undefined #65

Open jpv opened 6 years ago

jpv commented 6 years ago

var escapeString = function escapeString(value) {

let out = (value || "").toString(); out = out.replace(/\/g, "\\"); out = out.replace(/(/g, "\("); out = out.replace(/)/g, "\)"); out = out.toString("utf8"); return out; }