Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
angular - ERROR TypeError: Cannot read properties of undefined (reading 'initialize')

so when I'm testing with PDFNet library of PDFTRON, when I run only the file with PDFnet.initialize() function it works fine , but once I run it on angular it says :

core.mjs:6461 ERROR TypeError: Cannot read properties of undefined (reading 'initialize')

even tho I imported the namespace, here is my code:

const CryptoJS = require('crypto-js');
import { PDFNet } from '@pdftron/pdfnet-node';

import { exit } from 'process';
import * as qr from 'qr-image';

class DocumentSV {
  public statu: number;
    // ---------------- Preparation --------------------
    // Récuperer le document dont on veut signer
    constructor() {
        this.statu = 0;
        

    }
    async Sign(docpath : string, pfxpath : string) {
      
      try {
       await PDFNet.initialize(/*license*/);

      const doc = await PDFNet.PDFDoc.createFromFilePath(docpath);

    .
    .
    .
            await doc.save('src/app/Document/Signed.pdf', PDFNet.SDFDoc.SaveOptions.e_remove_unused);
            
            exit(1);

          } catch (err) {
            console.log('error', err)
        }
          }

}

const _DocumentSV = DocumentSV;
export { _DocumentSV as DocumentSV };```
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda