pdf-catalog-generator 3.1.0 → 3.1.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.mjs CHANGED
@@ -3,6 +3,29 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import * as XLSX from 'xlsx';
4
4
 
5
5
  // src/generator.tsx
6
+ var styles = StyleSheet.create({
7
+ wrapper: {
8
+ position: "absolute",
9
+ bottom: 6,
10
+ right: 10,
11
+ flexDirection: "row",
12
+ alignItems: "center",
13
+ opacity: 0.5
14
+ },
15
+ label: {
16
+ fontSize: 6.5,
17
+ color: "#666666",
18
+ letterSpacing: 0.2
19
+ },
20
+ link: {
21
+ fontSize: 6.5,
22
+ color: "#666666",
23
+ textDecoration: "none",
24
+ letterSpacing: 0.2
25
+ }
26
+ });
27
+ var PoweredByTeziApp = () => /* @__PURE__ */ jsx(View, { style: styles.wrapper, fixed: true, children: /* @__PURE__ */ jsx(Link, { style: styles.link, src: "https://teziapp.com", children: "Powered by Tezi App" }) });
28
+ var PoweredByTeziApp_default = PoweredByTeziApp;
6
29
 
7
30
  // src/utils/fieldHelpers.ts
8
31
  function formatFieldName(fieldName) {
@@ -184,12 +207,12 @@ var dynamicFieldStyles = StyleSheet.create({
184
207
  flexShrink: 1
185
208
  }
186
209
  });
187
- function renderDynamicFields(fields, styles8) {
210
+ function renderDynamicFields(fields, styles9) {
188
211
  if (fields.length === 0) return null;
189
- const containerStyle = styles8?.container || { marginBottom: 8 };
190
- const rowStyle = styles8?.row || dynamicFieldStyles.detailRow;
191
- const labelStyle = styles8?.label || dynamicFieldStyles.detailLabel;
192
- const valueStyle = styles8?.value || dynamicFieldStyles.detailValue;
212
+ const containerStyle = styles9?.container || { marginBottom: 8 };
213
+ const rowStyle = styles9?.row || dynamicFieldStyles.detailRow;
214
+ const labelStyle = styles9?.label || dynamicFieldStyles.detailLabel;
215
+ const valueStyle = styles9?.value || dynamicFieldStyles.detailValue;
193
216
  return /* @__PURE__ */ jsx(View, { style: containerStyle, children: fields.map(([key, value]) => /* @__PURE__ */ jsxs(View, { style: rowStyle, children: [
194
217
  /* @__PURE__ */ jsxs(Text, { style: labelStyle, children: [
195
218
  formatFieldName(key),
@@ -233,7 +256,7 @@ function mergeTemplateConfig(config = {}) {
233
256
  ...config
234
257
  };
235
258
  }
236
- var styles = StyleSheet.create({
259
+ var styles2 = StyleSheet.create({
237
260
  productContainer: {
238
261
  flexDirection: "row",
239
262
  flexWrap: "wrap",
@@ -297,27 +320,27 @@ var styles = StyleSheet.create({
297
320
  }
298
321
  });
299
322
  var Template1 = ({ products }) => {
300
- return /* @__PURE__ */ jsx(View, { style: styles.productContainer, children: products.map((product, index) => {
323
+ return /* @__PURE__ */ jsx(View, { style: styles2.productContainer, children: products.map((product, index) => {
301
324
  const fields = extractProductFields(product);
302
- return /* @__PURE__ */ jsxs(View, { style: styles.productSection, children: [
303
- /* @__PURE__ */ jsx(Image, { style: styles.image, src: fields.imageUrl }),
304
- /* @__PURE__ */ jsxs(View, { style: styles.productTitleBox, children: [
305
- /* @__PURE__ */ jsx(Text, { style: styles.productTitle, children: fields.title }),
306
- renderRating(fields.rating, styles.productRate)
325
+ return /* @__PURE__ */ jsxs(View, { style: styles2.productSection, children: [
326
+ /* @__PURE__ */ jsx(Image, { style: styles2.image, src: fields.imageUrl }),
327
+ /* @__PURE__ */ jsxs(View, { style: styles2.productTitleBox, children: [
328
+ /* @__PURE__ */ jsx(Text, { style: styles2.productTitle, children: fields.title }),
329
+ renderRating(fields.rating, styles2.productRate)
307
330
  ] }),
308
- fields.description && /* @__PURE__ */ jsx(Text, { style: styles.productDescription, children: fields.description }),
331
+ fields.description && /* @__PURE__ */ jsx(Text, { style: styles2.productDescription, children: fields.description }),
309
332
  renderDynamicFields(fields.dynamicFields),
310
333
  renderBuyButton(
311
334
  fields.link,
312
- styles.buyButton,
335
+ styles2.buyButton,
313
336
  "Buy Now",
314
- renderPrice(fields.price, styles.productPrice)
337
+ renderPrice(fields.price, styles2.productPrice)
315
338
  )
316
339
  ] }, index);
317
340
  }) });
318
341
  };
319
342
  var Template1_default = Template1;
320
- var styles2 = StyleSheet.create({
343
+ var styles3 = StyleSheet.create({
321
344
  productContainer: {
322
345
  flexDirection: "row",
323
346
  flexWrap: "wrap",
@@ -394,14 +417,14 @@ var styles2 = StyleSheet.create({
394
417
  }
395
418
  });
396
419
  var Template2 = ({ products }) => {
397
- return /* @__PURE__ */ jsx(View, { style: styles2.productContainer, children: products.map((product, index) => {
420
+ return /* @__PURE__ */ jsx(View, { style: styles3.productContainer, children: products.map((product, index) => {
398
421
  const fields = extractProductFields(product);
399
- return /* @__PURE__ */ jsxs(View, { style: styles2.productSection, children: [
400
- /* @__PURE__ */ jsxs(View, { style: styles2.productSectionImage, children: [
401
- /* @__PURE__ */ jsx(Image, { style: styles2.image, src: fields.imageUrl }),
402
- renderRating(fields.rating, styles2.productRate)
422
+ return /* @__PURE__ */ jsxs(View, { style: styles3.productSection, children: [
423
+ /* @__PURE__ */ jsxs(View, { style: styles3.productSectionImage, children: [
424
+ /* @__PURE__ */ jsx(Image, { style: styles3.image, src: fields.imageUrl }),
425
+ renderRating(fields.rating, styles3.productRate)
403
426
  ] }),
404
- /* @__PURE__ */ jsxs(View, { style: styles2.productSectionText, children: [
427
+ /* @__PURE__ */ jsxs(View, { style: styles3.productSectionText, children: [
405
428
  /* @__PURE__ */ jsxs(
406
429
  View,
407
430
  {
@@ -411,20 +434,20 @@ var Template2 = ({ products }) => {
411
434
  justifyContent: "space-between"
412
435
  },
413
436
  children: [
414
- /* @__PURE__ */ jsx(Text, { style: styles2.productTitle, children: fields.title }),
415
- renderPrice(fields.price, styles2.productPrice)
437
+ /* @__PURE__ */ jsx(Text, { style: styles3.productTitle, children: fields.title }),
438
+ renderPrice(fields.price, styles3.productPrice)
416
439
  ]
417
440
  }
418
441
  ),
419
- fields.description && /* @__PURE__ */ jsx(Text, { style: styles2.productDescription, children: fields.description }),
442
+ fields.description && /* @__PURE__ */ jsx(Text, { style: styles3.productDescription, children: fields.description }),
420
443
  renderDynamicFields(fields.dynamicFields),
421
- renderBuyButton(fields.link, styles2.buyButton)
444
+ renderBuyButton(fields.link, styles3.buyButton)
422
445
  ] })
423
446
  ] }, index);
424
447
  }) });
425
448
  };
426
449
  var Template2_default = Template2;
427
- var styles3 = StyleSheet.create({
450
+ var styles4 = StyleSheet.create({
428
451
  productSection: {
429
452
  width: "100%",
430
453
  height: "100vh",
@@ -504,10 +527,10 @@ var compactDynamicFieldStyles = StyleSheet.create({
504
527
  var Template3 = ({ products }) => {
505
528
  return /* @__PURE__ */ jsx(Fragment, { children: products.map((product, index) => {
506
529
  const fields = extractProductFields(product, { maxDynamicFields: 5 });
507
- return /* @__PURE__ */ jsxs(View, { style: styles3.productSection, children: [
508
- /* @__PURE__ */ jsx(Image, { style: styles3.image, src: fields.imageUrl }),
509
- /* @__PURE__ */ jsxs(View, { style: styles3.productDetailsBox, children: [
510
- /* @__PURE__ */ jsx(Text, { style: styles3.productTitle, children: fields.title }),
530
+ return /* @__PURE__ */ jsxs(View, { style: styles4.productSection, children: [
531
+ /* @__PURE__ */ jsx(Image, { style: styles4.image, src: fields.imageUrl }),
532
+ /* @__PURE__ */ jsxs(View, { style: styles4.productDetailsBox, children: [
533
+ /* @__PURE__ */ jsx(Text, { style: styles4.productTitle, children: fields.title }),
511
534
  /* @__PURE__ */ jsxs(
512
535
  View,
513
536
  {
@@ -517,25 +540,25 @@ var Template3 = ({ products }) => {
517
540
  justifyContent: "space-between"
518
541
  },
519
542
  children: [
520
- renderPrice(fields.price, styles3.productPrice),
521
- renderRating(fields.rating, styles3.productRate)
543
+ renderPrice(fields.price, styles4.productPrice),
544
+ renderRating(fields.rating, styles4.productRate)
522
545
  ]
523
546
  }
524
547
  ),
525
- fields.description && /* @__PURE__ */ jsx(Text, { style: styles3.productDescription, children: fields.description }),
548
+ fields.description && /* @__PURE__ */ jsx(Text, { style: styles4.productDescription, children: fields.description }),
526
549
  renderDynamicFields(fields.dynamicFields, {
527
550
  row: compactDynamicFieldStyles.detailRow,
528
551
  label: compactDynamicFieldStyles.detailLabel,
529
552
  value: compactDynamicFieldStyles.detailValue
530
553
  }),
531
- renderBuyButton(fields.link, styles3.buyButton)
554
+ renderBuyButton(fields.link, styles4.buyButton)
532
555
  ] }),
533
556
  /* @__PURE__ */ jsx(View, { break: true })
534
557
  ] }, index);
535
558
  }) });
536
559
  };
537
560
  var Template3_default = Template3;
538
- var styles4 = StyleSheet.create({
561
+ var styles5 = StyleSheet.create({
539
562
  page: {
540
563
  width: "100%",
541
564
  height: "100%",
@@ -632,21 +655,21 @@ var Template4 = ({
632
655
  )
633
656
  );
634
657
  const fields = extractProductFields(product);
635
- return /* @__PURE__ */ jsxs(View, { style: styles4.page, children: [
636
- /* @__PURE__ */ jsxs(View, { style: styles4.header, children: [
637
- /* @__PURE__ */ jsx(Text, { style: styles4.companyName, children: companyName || "" }),
638
- companyLogo && /* @__PURE__ */ jsx(Image, { style: styles4.brandLogo, src: companyLogo })
658
+ return /* @__PURE__ */ jsxs(View, { style: styles5.page, children: [
659
+ /* @__PURE__ */ jsxs(View, { style: styles5.header, children: [
660
+ /* @__PURE__ */ jsx(Text, { style: styles5.companyName, children: companyName || "" }),
661
+ companyLogo && /* @__PURE__ */ jsx(Image, { style: styles5.brandLogo, src: companyLogo })
639
662
  ] }),
640
- /* @__PURE__ */ jsxs(View, { style: styles4.productContainer, children: [
641
- /* @__PURE__ */ jsx(Image, { style: styles4.productImage, src: fields.imageUrl }),
642
- allFields.length > 0 && /* @__PURE__ */ jsx(View, { style: styles4.detailsBox, children: renderFieldsInColumns(allFields) })
663
+ /* @__PURE__ */ jsxs(View, { style: styles5.productContainer, children: [
664
+ /* @__PURE__ */ jsx(Image, { style: styles5.productImage, src: fields.imageUrl }),
665
+ allFields.length > 0 && /* @__PURE__ */ jsx(View, { style: styles5.detailsBox, children: renderFieldsInColumns(allFields) })
643
666
  ] }),
644
667
  /* @__PURE__ */ jsx(View, { break: true })
645
668
  ] }, index);
646
669
  }) });
647
670
  };
648
671
  var Template4_default = Template4;
649
- var styles5 = StyleSheet.create({
672
+ var styles6 = StyleSheet.create({
650
673
  page: {
651
674
  width: "100%",
652
675
  height: "100%",
@@ -759,22 +782,22 @@ var Template5 = ({
759
782
  const { imageUrl, title, dynamicFields } = extractProductFields(product);
760
783
  const image2Url = getImage2Url(product);
761
784
  const secondImage = image2Url || imageUrl;
762
- return /* @__PURE__ */ jsxs(View, { style: styles5.page, children: [
763
- /* @__PURE__ */ jsxs(View, { style: styles5.header, children: [
764
- companyLogo && /* @__PURE__ */ jsx(Image, { style: styles5.logo, src: companyLogo }),
765
- /* @__PURE__ */ jsx(Text, { style: styles5.companyName, children: companyName })
785
+ return /* @__PURE__ */ jsxs(View, { style: styles6.page, children: [
786
+ /* @__PURE__ */ jsxs(View, { style: styles6.header, children: [
787
+ companyLogo && /* @__PURE__ */ jsx(Image, { style: styles6.logo, src: companyLogo }),
788
+ /* @__PURE__ */ jsx(Text, { style: styles6.companyName, children: companyName })
766
789
  ] }),
767
- /* @__PURE__ */ jsxs(View, { style: styles5.contentContainer, children: [
768
- /* @__PURE__ */ jsxs(View, { style: styles5.imageSection, children: [
769
- /* @__PURE__ */ jsx(View, { style: styles5.imageWrapper, children: /* @__PURE__ */ jsx(Image, { style: styles5.productImage, src: imageUrl }) }),
770
- /* @__PURE__ */ jsx(View, { style: styles5.imageWrapper, children: /* @__PURE__ */ jsx(Image, { style: styles5.productImage, src: secondImage }) })
790
+ /* @__PURE__ */ jsxs(View, { style: styles6.contentContainer, children: [
791
+ /* @__PURE__ */ jsxs(View, { style: styles6.imageSection, children: [
792
+ /* @__PURE__ */ jsx(View, { style: styles6.imageWrapper, children: /* @__PURE__ */ jsx(Image, { style: styles6.productImage, src: imageUrl }) }),
793
+ /* @__PURE__ */ jsx(View, { style: styles6.imageWrapper, children: /* @__PURE__ */ jsx(Image, { style: styles6.productImage, src: secondImage }) })
771
794
  ] }),
772
- /* @__PURE__ */ jsxs(View, { style: styles5.detailsSection, children: [
773
- title && /* @__PURE__ */ jsx(Text, { style: styles5.productTitle, children: title }),
774
- /* @__PURE__ */ jsx(View, { style: styles5.dynamicFieldsContainer, children: renderDynamicFields(dynamicFields, {
775
- row: styles5.detailRow,
776
- label: styles5.detailLabel,
777
- value: styles5.detailValue
795
+ /* @__PURE__ */ jsxs(View, { style: styles6.detailsSection, children: [
796
+ title && /* @__PURE__ */ jsx(Text, { style: styles6.productTitle, children: title }),
797
+ /* @__PURE__ */ jsx(View, { style: styles6.dynamicFieldsContainer, children: renderDynamicFields(dynamicFields, {
798
+ row: styles6.detailRow,
799
+ label: styles6.detailLabel,
800
+ value: styles6.detailValue
778
801
  }) })
779
802
  ] })
780
803
  ] }),
@@ -783,7 +806,7 @@ var Template5 = ({
783
806
  }) });
784
807
  };
785
808
  var Template5_default = Template5;
786
- var styles6 = StyleSheet.create({
809
+ var styles7 = StyleSheet.create({
787
810
  page: {
788
811
  width: "100%",
789
812
  height: "100%",
@@ -924,26 +947,26 @@ var Template6 = ({
924
947
  const { imageUrl, title, dynamicFields } = extractProductFields(product);
925
948
  const image2Url = getImage2Url2(product);
926
949
  const secondImage = image2Url || imageUrl;
927
- return /* @__PURE__ */ jsxs(View, { style: styles6.page, children: [
928
- /* @__PURE__ */ jsxs(View, { style: styles6.leftColumn, children: [
929
- /* @__PURE__ */ jsx(Image, { style: styles6.imageFull, src: imageUrl }),
930
- /* @__PURE__ */ jsxs(View, { style: styles6.specsOverlay, children: [
931
- /* @__PURE__ */ jsxs(View, { style: styles6.specsHeader, children: [
932
- companyLogo && /* @__PURE__ */ jsx(Image, { style: styles6.miniLogo, src: companyLogo }),
933
- /* @__PURE__ */ jsx(Text, { style: styles6.designNumber, children: title || "Specifications" })
950
+ return /* @__PURE__ */ jsxs(View, { style: styles7.page, children: [
951
+ /* @__PURE__ */ jsxs(View, { style: styles7.leftColumn, children: [
952
+ /* @__PURE__ */ jsx(Image, { style: styles7.imageFull, src: imageUrl }),
953
+ /* @__PURE__ */ jsxs(View, { style: styles7.specsOverlay, children: [
954
+ /* @__PURE__ */ jsxs(View, { style: styles7.specsHeader, children: [
955
+ companyLogo && /* @__PURE__ */ jsx(Image, { style: styles7.miniLogo, src: companyLogo }),
956
+ /* @__PURE__ */ jsx(Text, { style: styles7.designNumber, children: title || "Specifications" })
934
957
  ] }),
935
958
  renderDynamicFields(dynamicFields, {
936
- row: styles6.fieldRow,
937
- label: styles6.fieldLabel,
938
- value: styles6.fieldValue
959
+ row: styles7.fieldRow,
960
+ label: styles7.fieldLabel,
961
+ value: styles7.fieldValue
939
962
  })
940
963
  ] })
941
964
  ] }),
942
- /* @__PURE__ */ jsxs(View, { style: styles6.rightColumn, children: [
943
- /* @__PURE__ */ jsx(View, { style: styles6.rightImageContainer, children: /* @__PURE__ */ jsx(Image, { style: styles6.rightImage, src: secondImage }) }),
944
- /* @__PURE__ */ jsx(View, { style: styles6.footer, children: /* @__PURE__ */ jsxs(View, { style: styles6.footerContent, children: [
945
- companyLogo && /* @__PURE__ */ jsx(Image, { style: styles6.footerLogo, src: companyLogo }),
946
- /* @__PURE__ */ jsx(Text, { style: styles6.footerText, children: companyName })
965
+ /* @__PURE__ */ jsxs(View, { style: styles7.rightColumn, children: [
966
+ /* @__PURE__ */ jsx(View, { style: styles7.rightImageContainer, children: /* @__PURE__ */ jsx(Image, { style: styles7.rightImage, src: secondImage }) }),
967
+ /* @__PURE__ */ jsx(View, { style: styles7.footer, children: /* @__PURE__ */ jsxs(View, { style: styles7.footerContent, children: [
968
+ companyLogo && /* @__PURE__ */ jsx(Image, { style: styles7.footerLogo, src: companyLogo }),
969
+ /* @__PURE__ */ jsx(Text, { style: styles7.footerText, children: companyName })
947
970
  ] }) })
948
971
  ] }),
949
972
  /* @__PURE__ */ jsx(View, { break: true })
@@ -951,7 +974,7 @@ var Template6 = ({
951
974
  }) });
952
975
  };
953
976
  var Template6_default = Template6;
954
- var styles7 = StyleSheet.create({
977
+ var styles8 = StyleSheet.create({
955
978
  page: {
956
979
  flexDirection: "column",
957
980
  backgroundColor: "#FFFFFF"
@@ -983,26 +1006,6 @@ Font.registerEmojiSource({
983
1006
  format: "png",
984
1007
  url: "https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/"
985
1008
  });
986
- function normalizeImageSource(imageSource) {
987
- if (imageSource.startsWith("data:")) {
988
- return imageSource;
989
- }
990
- if (imageSource.startsWith("http://") || imageSource.startsWith("https://")) {
991
- return imageSource;
992
- }
993
- let mimeType = "image/png";
994
- const base64Start = imageSource.substring(0, 20).toLowerCase();
995
- if (base64Start.includes("ivborw0kggo") || imageSource.startsWith("iVBORw0KGgo")) {
996
- mimeType = "image/png";
997
- } else if (base64Start.includes("/9j/4aaq") || imageSource.startsWith("/9j/4AAQ")) {
998
- mimeType = "image/jpeg";
999
- } else if (base64Start.includes("r0lgodlh") || imageSource.startsWith("R0lGODlh")) {
1000
- mimeType = "image/gif";
1001
- } else if (base64Start.includes("uklgr") || imageSource.startsWith("UklGR")) {
1002
- mimeType = "image/webp";
1003
- }
1004
- return `data:${mimeType};base64,${imageSource}`;
1005
- }
1006
1009
  async function generateProductCatalog(config) {
1007
1010
  const { products, companyLogo, companyName, template = "template1" } = config;
1008
1011
  let TemplateComponent;
@@ -1029,39 +1032,45 @@ async function generateProductCatalog(config) {
1029
1032
  TemplateComponent = Template1_default;
1030
1033
  }
1031
1034
  if (template === "template4") {
1032
- const doc2 = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsx(Page, { size: "A4", style: styles7.page, children: /* @__PURE__ */ jsx(
1033
- Template4_default,
1034
- {
1035
- products,
1036
- companyLogo: companyLogo ? normalizeImageSource(companyLogo) : void 0,
1037
- companyName
1038
- }
1039
- ) }) });
1035
+ const doc2 = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsxs(Page, { size: "A4", style: styles8.page, children: [
1036
+ /* @__PURE__ */ jsx(
1037
+ Template4_default,
1038
+ {
1039
+ products,
1040
+ companyLogo,
1041
+ companyName
1042
+ }
1043
+ ),
1044
+ /* @__PURE__ */ jsx(PoweredByTeziApp_default, {})
1045
+ ] }) });
1040
1046
  const blob2 = await pdf(doc2).toBlob();
1041
1047
  const arrayBuffer2 = await blob2.arrayBuffer();
1042
1048
  return new Uint8Array(arrayBuffer2);
1043
1049
  }
1044
1050
  if (template === "template5" || template === "template6") {
1045
1051
  const Template = template === "template5" ? Template5_default : Template6_default;
1046
- const doc2 = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsx(Page, { size: "A4", orientation: "landscape", style: styles7.page, children: /* @__PURE__ */ jsx(
1047
- Template,
1048
- {
1049
- products,
1050
- companyLogo: companyLogo ? normalizeImageSource(companyLogo) : void 0,
1051
- companyName
1052
- }
1053
- ) }) });
1052
+ const doc2 = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsxs(Page, { size: "A4", orientation: "landscape", style: styles8.page, children: [
1053
+ /* @__PURE__ */ jsx(
1054
+ Template,
1055
+ {
1056
+ products,
1057
+ companyLogo,
1058
+ companyName
1059
+ }
1060
+ ),
1061
+ /* @__PURE__ */ jsx(PoweredByTeziApp_default, {})
1062
+ ] }) });
1054
1063
  const blob2 = await pdf(doc2).toBlob();
1055
1064
  const arrayBuffer2 = await blob2.arrayBuffer();
1056
1065
  return new Uint8Array(arrayBuffer2);
1057
1066
  }
1058
- const doc = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsxs(Page, { size: "A4", style: styles7.page, children: [
1059
- /* @__PURE__ */ jsxs(View, { style: styles7.header, children: [
1060
- companyLogo && /* @__PURE__ */ jsx(View, { style: styles7.logoSection, children: /* @__PURE__ */ jsx(Image, { style: styles7.logo, src: normalizeImageSource(companyLogo) }) }),
1061
- /* @__PURE__ */ jsx(View, { style: styles7.storeNameSection, children: /* @__PURE__ */ jsx(Text, { style: styles7.storeName, children: companyName }) }),
1062
- /* @__PURE__ */ jsx(View, { break: true })
1067
+ const doc = /* @__PURE__ */ jsx(Document, { children: /* @__PURE__ */ jsxs(Page, { size: "A4", style: styles8.page, children: [
1068
+ /* @__PURE__ */ jsxs(View, { style: styles8.header, children: [
1069
+ companyLogo && /* @__PURE__ */ jsx(View, { style: styles8.logoSection, children: /* @__PURE__ */ jsx(Image, { style: styles8.logo, src: companyLogo }) }),
1070
+ /* @__PURE__ */ jsx(View, { style: styles8.storeNameSection, children: /* @__PURE__ */ jsx(Text, { style: styles8.storeName, children: companyName }) })
1063
1071
  ] }),
1064
- /* @__PURE__ */ jsx(TemplateComponent, { products })
1072
+ /* @__PURE__ */ jsx(TemplateComponent, { products }),
1073
+ /* @__PURE__ */ jsx(PoweredByTeziApp_default, {})
1065
1074
  ] }) });
1066
1075
  const blob = await pdf(doc).toBlob();
1067
1076
  const arrayBuffer = await blob.arrayBuffer();