softdinlibreriajs 12.0.33 → 12.0.35

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.
Files changed (2) hide show
  1. package/package.json +2 -5
  2. package/src/GenerarPDF.js +0 -72
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "softdinlibreriajs",
3
- "version": "12.0.33",
3
+ "version": "12.0.35",
4
4
  "description": "Libreria Softdin",
5
5
  "main": "src/",
6
6
  "scripts": {
@@ -19,8 +19,5 @@
19
19
  "url": "https://github.com/SoftdinNomina/libreriaSoftdinJS/issues"
20
20
  },
21
21
  "homepage": "https://github.com/SoftdinNomina/libreriaSoftdinJS#readme",
22
- "_comments": "comando para ejecutar las veriosnes despues debe cambiar la VERSION 12.0.24 por la que sigue despues ejecutar este comando npm publish",
23
- "dependencies": {
24
- "pdfmake": "^0.2.14"
25
- }
22
+ "_comments": "comando para ejecutar las veriosnes despues debe cambiar la VERSION 12.0.24 por la que sigue despues ejecutar este comando npm publish"
26
23
  }
package/src/GenerarPDF.js DELETED
@@ -1,72 +0,0 @@
1
- import pdfMake from 'pdfmake/build/pdfmake';
2
- import pdfFonts from 'pdfmake/build/vfs_fonts';
3
-
4
- // Registrar las fuentes de pdfmake
5
- pdfMake.vfs = pdfFonts.pdfMake.vfs;
6
-
7
- // Función para generar el PDF
8
- export const generarCertificadoLaboral = (logo, employeeName, companyName, jobTitle, startDate, endDate) => {
9
- const docDefinition = {
10
- header: {
11
- columns: [
12
- // { image: logo, width: 100 }, // Logo en base64 o URL
13
- {
14
- text: companyName,
15
- // alignment: 'center',
16
- // margin: [0, 15, 0, 0],
17
- // fontSize: 18,
18
- // bold: true
19
- }
20
- ]
21
- },
22
- content: [
23
- { text: 'Certificado Laboral', style: 'header' },
24
- {
25
- text: `A quien corresponda:`,
26
- margin: [0, 20]
27
- },
28
- {
29
- text: [
30
- `Por medio de la presente se certifica que el señor/a `,
31
- { text: employeeName, bold: true },
32
- ` ha laborado en nuestra empresa `,
33
- { text: companyName, bold: true },
34
- ` como `,
35
- { text: jobTitle, bold: true },
36
- ` desde `,
37
- { text: startDate, bold: true },
38
- ` hasta `,
39
- { text: endDate, bold: true },
40
- `.`
41
- ]
42
- },
43
- { text: 'Agradecemos la atención a la presente.', margin: [0, 20] }
44
- ],
45
- footer: function(currentPage, pageCount) {
46
- return {
47
- columns: [
48
- { text: `Página ${currentPage} de ${pageCount}`, alignment: 'right', margin: [0, 0, 20, 0] },
49
- { text: 'Pie de página - Información de contacto', alignment: 'center', margin: [0, 0, 0, 10] }
50
- ]
51
- };
52
- },
53
- styles: {
54
- header: {
55
- fontSize: 22,
56
- bold: true,
57
- alignment: 'center'
58
- }
59
- }
60
- };
61
-
62
- // Generar el PDF
63
- pdfMake.createPdf(docDefinition).getDataUrl((dataUrl) => {
64
- const iframeContainer = document.getElementById('iframeContainer');
65
- if (iframeContainer) {
66
- iframeContainer.src = dataUrl;
67
- } else {
68
- console.error('Element with id "iframeContainer" not found.');
69
- }
70
- });
71
- };
72
-