Module Not Found error while using PdfDocument

Posted by: rajalakshmi.sm on 7 May 2018, 6:06 am EST

    • Post Options:
    • Link

    Posted 7 May 2018, 6:06 am EST

    Hi

    Export Pdf is not working as expected. Module not found error will come @ PdfDocument

    Here is the code details

    import * as wjcGridPDF from ‘wijmo/wijmo.grid.pdf’;

    import * as wjcPDF from ‘wijmo/wijmo.pdf’;

    import * as wjcCore from ‘wijmo/wijmo’;

    import * as wjcGrid from ‘wijmo/wijmo.grid’;

    import * as wjFilter from ‘wijmo/wijmo.angular2.grid.filter’;

    import * as wjcInput from ‘wijmo/wijmo.input’;

    pdfFlex()

    {

    let doc = new wjcPDF.PdfDocument({ // error

    ended: function (sender, args) {

    wjcPDF.saveBlob(args.blob, ‘FlexGrid.pdf’);

    }

    });

    doc.drawTex…

    }

    Environment details

    OS:- Windows 10 64-bit

    Wijmo:- 5.20162.231 (Licensed Version)

    Angular:- Angular 2.x

    Thank You,

    Regards,

    Raje

  • Posted 7 May 2018, 10:47 pm EST

    Hi Raje,

    If we are correct, you are using Wijmo-AMD-Min modules.

    Please use CommonJS modules whenever possible. Unless you use RequireJS, there is no benefit in AMD over CommonJS. Because the reported problem is WebPack specific, I suppose that you use WebPack, where Wijmo CommonJS modules will work just fine.

    ~Manish

  • Posted 7 May 2018, 11:26 pm EST

    We have already used CommonJs and later migrated to WebPack. Now we have made too many changes(new features also implemented) in the application by using WebPack and it is difficult migrate back to the CommonJs. so please provide some fix in the WebPack itself.

  • Posted 8 May 2018, 12:44 am EST

    Hi Raje,

    We are sorry for not being specific. Please try with wijmo-commonjs-min module shipped with Wijmo NPM-Images.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels