I am using pdfkit node module to generate a pdf. My problem is that I want to insert a text on a dashed line. This is what I am doing:
doc.moveDown(2)
.moveTo(x+leftMargin, doc.y)
.lineTo(doc.x, doc.y)
.lineWidth(0.5)
.dash(3,{space:3})
.fillAndStroke(defBlackColor)
.fill(defBlackColor)
.fontSize(defFontSize)
.text('Layover:'+' '+ obj.layover,x + leftMargin + xincr/2,doc.y);
But it returns text just below the dashed line, like this:
How can I achieve it?
