tenta fix pdfservice.js

This commit is contained in:
rodrigo committed 2025-04-21 19:39:03 -03:00
1 parent 926a2934e4
commit 5786af03d5
1 file changed
+3 -1
+3 -1
View File
@@ -266,7 +266,9 @@ export class PdfService {
// Função para quebrar texto em linhas respeitando largura máxima
function wrapText(text: string, font: any, fontSize: number, maxWidth: number): string[] {
const words = text.split(' ');
// Remove quebras de linha internas para evitar erro de encoding
const cleanText = text.replace(/\r?\n/g, ' ');
const words = cleanText.split(' ');
const lines: string[] = [];
let currentLine = '';
for (const word of words) {