etiquetas.js 1.0.0-alpha.11 → 1.0.0-alpha.13

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.
@@ -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-eEPQXFRd.js")).catch(function(t3) {
11533
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-BrEbBPfG.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: "grid",
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
@@ -28862,19 +28864,11 @@ function insertFiguresToPdf(_e) {
28862
28864
  tableWidth: vWidth,
28863
28865
  rowPageBreak: "avoid",
28864
28866
  pageBreak: "auto",
28865
- showHead: "firstPage"
28866
- /* didDrawPage: function(data) {
28867
- // Quando nova página for criada, redefine Y mas mantém a mesma margem esquerda
28868
- data.settings.margin.top = 0.5;
28869
- data.cursor.y = 0.5;
28870
- },
28871
- columnStyles: {
28872
- // Definição de larguras específicas para colunas
28873
- 0: { cellWidth: vWidth * 0.15 }, // ID - 15%
28874
- 1: { cellWidth: vWidth * 0.4 }, // Nome - 40%
28875
- 2: { cellWidth: vWidth * 0.1 }, // Qtd - 10%
28876
- 3: { cellWidth: vWidth * 0.35 } // Dimensões - 35%
28877
- }*/
28867
+ showHead: "firstPage",
28868
+ didDrawPage: function(data) {
28869
+ data.settings.margin.top = 0;
28870
+ data.cursor.y = 0;
28871
+ }
28878
28872
  });
28879
28873
  } catch (tableError) {
28880
28874
  console.error("Erro ao criar tabela automatizada:", tableError);
@@ -58537,7 +58531,7 @@ var pako = {
58537
58531
  };
58538
58532
  GlobalWorkerOptions.workerSrc = "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/5.4.54/pdf.worker.min.mjs";
58539
58533
  const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (pdfBuffer, options = {}) {
58540
- const { scale = 2.85, format = "image/png" } = options;
58534
+ const { scale = 2.85 } = options;
58541
58535
  try {
58542
58536
  let arrayBuffer;
58543
58537
  if (pdfBuffer instanceof ArrayBuffer) {
@@ -58554,7 +58548,7 @@ const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function*
58554
58548
  console.log(`🔄 Convertendo PDF para imagens: ${pageCount} páginas`);
58555
58549
  for (let pageNum = 1; pageNum <= pageCount; pageNum++) {
58556
58550
  const page = yield pdf.getPage(pageNum);
58557
- const viewport = page.getViewport({ scale: 5 });
58551
+ const viewport = page.getViewport({ scale: 28 });
58558
58552
  const canvas2 = document.createElement("canvas");
58559
58553
  const context = canvas2.getContext("2d");
58560
58554
  canvas2.height = viewport.height;
@@ -58563,7 +58557,7 @@ const convertPdfToImages = (_0, ..._1) => __async(void 0, [_0, ..._1], function*
58563
58557
  canvasContext: context,
58564
58558
  viewport
58565
58559
  }).promise;
58566
- dataUrls.push(canvas2.toDataURL(format));
58560
+ dataUrls.push(canvas2.toDataURL("image/png"));
58567
58561
  console.log(`✅ Página ${pageNum}/${pageCount} convertida`);
58568
58562
  }
58569
58563
  return dataUrls;
@@ -59979,4 +59973,4 @@ export {
59979
59973
  sendToPrinter as y,
59980
59974
  validateLabelData as z
59981
59975
  };
59982
- //# sourceMappingURL=index-Bl0CvwuC.js.map
59976
+ //# sourceMappingURL=index-D33AuT1p.js.map