Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

157
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda