etiquetas.js 1.0.0-alpha.12 → 1.0.0-alpha.14
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/etiquetas.es.js +1 -1
- package/dist/etiquetas.umd.js +2 -2
- package/dist/etiquetas.umd.js.map +1 -1
- package/dist/{index-ByX7GCn9.js → index-0gBKtbw4.js} +9 -7
- package/dist/{index-ByX7GCn9.js.map → index-0gBKtbw4.js.map} +1 -1
- package/dist/{index.es-D9tZR_eO.js → index.es-CjFLf4zU.js} +2 -2
- package/dist/{index.es-D9tZR_eO.js.map → index.es-CjFLf4zU.js.map} +1 -1
- package/package.json +1 -1
|
@@ -11530,7 +11530,7 @@ function(t2) {
|
|
|
11530
11530
|
*/
|
|
11531
11531
|
function(t2) {
|
|
11532
11532
|
function e2() {
|
|
11533
|
-
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-
|
|
11533
|
+
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-CjFLf4zU.js")).catch(function(t3) {
|
|
11534
11534
|
return Promise.reject(new Error("Could not load canvg: " + t3));
|
|
11535
11535
|
}).then(function(t3) {
|
|
11536
11536
|
return t3.default ? t3.default : t3;
|
|
@@ -28843,10 +28843,12 @@ function insertFiguresToPdf(_e) {
|
|
|
28843
28843
|
body: rows,
|
|
28844
28844
|
// Linhas
|
|
28845
28845
|
startY,
|
|
28846
|
-
theme: "
|
|
28846
|
+
theme: "plain",
|
|
28847
28847
|
// Estilo da tabela
|
|
28848
28848
|
styles: {
|
|
28849
28849
|
fontSize: 8,
|
|
28850
|
+
fontStyle: "bold",
|
|
28851
|
+
textColor: "#000000",
|
|
28850
28852
|
cellPadding: 0.5,
|
|
28851
28853
|
// lineHeight: 0.6,
|
|
28852
28854
|
minCellHeight: 1.8
|
|
@@ -58527,9 +58529,9 @@ var pako = {
|
|
|
58527
58529
|
ungzip: ungzip_1,
|
|
58528
58530
|
constants: constants_1
|
|
58529
58531
|
};
|
|
58530
|
-
GlobalWorkerOptions.workerSrc = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/5.4.
|
|
58532
|
+
GlobalWorkerOptions.workerSrc = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/5.4.149/pdf.worker.min.mjs";
|
|
58531
58533
|
const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (pdfBuffer, options = {}) {
|
|
58532
|
-
const { scale = 2.85
|
|
58534
|
+
const { scale = 2.85 } = options;
|
|
58533
58535
|
try {
|
|
58534
58536
|
let arrayBuffer;
|
|
58535
58537
|
if (pdfBuffer instanceof ArrayBuffer) {
|
|
@@ -58546,7 +58548,7 @@ const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function*
|
|
|
58546
58548
|
console.log(`🔄 Convertendo PDF para imagens: ${pageCount} páginas`);
|
|
58547
58549
|
for (let pageNum = 1; pageNum <= pageCount; pageNum++) {
|
|
58548
58550
|
const page = yield pdf.getPage(pageNum);
|
|
58549
|
-
const viewport = page.getViewport({ scale:
|
|
58551
|
+
const viewport = page.getViewport({ scale: 28 });
|
|
58550
58552
|
const canvas2 = document.createElement("canvas");
|
|
58551
58553
|
const context = canvas2.getContext("2d");
|
|
58552
58554
|
canvas2.height = viewport.height;
|
|
@@ -58555,7 +58557,7 @@ const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function*
|
|
|
58555
58557
|
canvasContext: context,
|
|
58556
58558
|
viewport
|
|
58557
58559
|
}).promise;
|
|
58558
|
-
dataUrls.push(canvas2.toDataURL(
|
|
58560
|
+
dataUrls.push(canvas2.toDataURL("image/png"));
|
|
58559
58561
|
console.log(`✅ Página ${pageNum}/${pageCount} convertida`);
|
|
58560
58562
|
}
|
|
58561
58563
|
return dataUrls;
|
|
@@ -59971,4 +59973,4 @@ export {
|
|
|
59971
59973
|
sendToPrinter as y,
|
|
59972
59974
|
validateLabelData as z
|
|
59973
59975
|
};
|
|
59974
|
-
//# sourceMappingURL=index-
|
|
59976
|
+
//# sourceMappingURL=index-0gBKtbw4.js.map
|