pols-pdf 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -459,6 +459,8 @@ class PPdf {
|
|
|
459
459
|
t.chars = '';
|
|
460
460
|
/* Sustituye los tabs por espacios regulares. */
|
|
461
461
|
t.chars = t.chars.replace(/\t/g, ' ');
|
|
462
|
+
/* Normaliza saltos de línea (\r\n o \r solo) a \n, único carácter que el layout reconoce como salto. */
|
|
463
|
+
t.chars = t.chars.replace(/\r\n?/g, '\n');
|
|
462
464
|
const fontKey = `${font.name}|${font.bold}|${font.oblique}|${font.size}`;
|
|
463
465
|
/* heightOfString no depende del carácter (es puramente la altura de línea de la fuente
|
|
464
466
|
activa), así que se mide una sola vez por fuente en vez de una vez por carácter. */
|