tenta fix pdfservice.js

This commit is contained in:
rodrigo committed 2025-04-21 23:07:18 -03:00
1 parent 5798152f7b
commit 8abf8791be
1 file changed
+2
+2
View File
@@ -395,6 +395,8 @@ export class PdfService {
let lines: { tokens: { text: string, font: any, underline: boolean, bold: boolean, italic: boolean }[] }[] = []; let lines: { tokens: { text: string, font: any, underline: boolean, bold: boolean, italic: boolean }[] }[] = [];
let currentTokens: { text: string, font: any, underline: boolean, bold: boolean, italic: boolean }[] = []; let currentTokens: { text: string, font: any, underline: boolean, bold: boolean, italic: boolean }[] = [];
let currentWidth = 0; let currentWidth = 0;
// Defina recuo antes do loop
let recuo = indent ? fontSize * 2 : 0;
for (const [i, word] of words.entries()) { for (const [i, word] of words.entries()) {
const wordWidth = word.font.widthOfTextAtSize(word.text, fontSize); const wordWidth = word.font.widthOfTextAtSize(word.text, fontSize);
// Corrige o cálculo de recuo apenas na primeira palavra da primeira linha // Corrige o cálculo de recuo apenas na primeira palavra da primeira linha