Some Serial Invoice
Free Text Pos Minor Changes
This commit is contained in:
@@ -837,17 +837,17 @@ export const useCreatePdf = async (invoiceData,backgroundSourceBuffer) => {
|
||||
rowHeight += 3
|
||||
}
|
||||
|
||||
let textAutoLines = (row.text.match(/.{1,70}/g) || []).length
|
||||
let textAutoLines = (row.text.match(/.{1,60}/g) || []).length
|
||||
|
||||
pages[pageCounter - 1].drawRectangle({
|
||||
...getCoordinatesForPDFLib(20,rowHeight, page1),
|
||||
width: 180 * 2.83,
|
||||
height: 8 * 3,
|
||||
height: 8 * 2.83,
|
||||
color: rgb(0,0,0),
|
||||
opacity: 0.25
|
||||
})
|
||||
|
||||
pages[pageCounter - 1].drawText(row.text.match(/.{1,70}/g).join("\n"), {
|
||||
pages[pageCounter - 1].drawText(row.text.match(/.{1,60}/g).join("\n"), {
|
||||
...getCoordinatesForPDFLib(21,rowHeight - 3, page1),
|
||||
size:12,
|
||||
color:rgb(0,0,0),
|
||||
@@ -861,7 +861,7 @@ export const useCreatePdf = async (invoiceData,backgroundSourceBuffer) => {
|
||||
|
||||
|
||||
if(row.description) {
|
||||
pages[pageCounter - 1].drawText(row.description.match(/.{1,85}/g).join("\n"), {
|
||||
pages[pageCounter - 1].drawText(row.description.match(/.{1,80}/g).join("\n"), {
|
||||
...getCoordinatesForPDFLib(21,rowHeight + ( textAutoLines * 4), page1),
|
||||
size:10,
|
||||
color:rgb(0,0,0),
|
||||
@@ -870,7 +870,7 @@ export const useCreatePdf = async (invoiceData,backgroundSourceBuffer) => {
|
||||
})
|
||||
}
|
||||
|
||||
let addHeight = ((row.description.match(/.{1,85}/g) || []).length + textAutoLines) * 8
|
||||
let addHeight = (row.description.match(/.{1,80}/g) || []).length * 4 + 10
|
||||
console.log(addHeight)
|
||||
rowHeight += addHeight
|
||||
|
||||
|
||||
Reference in New Issue
Block a user