PrintDocument is not working in Firefox

Posted by: rajalakshmi.sm on 3 May 2018, 1:11 am EST

    • Post Options:
    • Link

    Posted 3 May 2018, 1:11 am EST

    Hi

    PrintDocument is not working and application gets hanged in firefox browser. (I’m using wijmo5 Angular2)

    var doc = new wjcCore.PrintDocument();

    doc.append(‘sample title’);

    doc.append(document.getElementById(‘SampleElementId’));

    doc.print();

    Sample URL “http://demos.wijmo.com/5/Angular/PrintDocument/PrintDocument/” also provide the same issue.

    Please help me to sort out the issue

    Regards,

    Raje

  • Posted 3 May 2018, 9:33 pm EST

    Hi,

    We are sorry, we are unable to reproduce the issue at our end.

    Here are our steps used to replicate the issue at our end-

    For kind information, the following sample http://demos.wijmo.com/5/Angular/PrintDocument/PrintDocument/ also worked as expected.

    Please let us know if there are any additional steps to recreate the problem.

    We tested the sample in following environment:-

    OS:- Windows 10 64-bit

    Browser:- Firefox 59.0.2

    Wijmo:- Wijmo Eval Version 5.20181.436

    Angular:- Angular 5.2.8

    If you are facing the problem in a certain architecture/environment please let us know the architecture info.

    ~Manish

  • Posted 7 May 2018, 4:36 am EST

    In this example, “https://stackblitz.com/edit/angular-zukhzi?file=app%2Fapp.component.ts”, the element ID, (named as ‘someID’) is not available. so, firefox didnt provide the print result as we expected. But in our case

    we have used simple elements

    var doc = new wjcCore.PrintDocument();

    doc.append(‘sample title’);

    doc.append(document.getElementById(‘SampleElementId’));

    /* SampleElementId is exist in DOM or with in the body */

    doc.print();

    Environment details are listed below

    OS:- Windows 10 64-bit

    Browser:- Firefox 56.x.x

    Wijmo:- 5.20162.231 (Licensed Version)

    Angular:- Angular 2.x

    Thank You,

    Regards,

    Raje

  • Posted 7 May 2018, 5:37 am EST

    Sorry, forgot to say additional information/notes

    a) Application gets hanged once clicked the print button (print working at first time, next click or not able to click any element until refresh the page)

    b) Grids (wj-flex-grid) records or rows become empty in firefox after clicked the print button. We didnt get/retrieved the grid data even refreshed the page in firefox

  • Posted 8 May 2018, 12:40 am EST

    Hi,

    Thanks for add on information.

    We are looking into it and let you know by tomorrow.

    ~Manish

  • Posted 9 May 2018, 12:49 am EST

    Hi,

    We are sorry, we are unable to replicate the issue at our end. Please find the updated sample with FlexGrid and element with element ID.

    https://stackblitz.com/edit/angular-wg72g3?file=app%2Fapp.component.ts

    Please try with this sample and share your observation.

    PS: We are using 5.20181.436 version.

    ~Manish

  • Posted 17 May 2018, 6:11 pm EST

    We are using wijmo version": "5.20171.282" and for Angular 2.4.x. We have tried your sample too. But the issue is not resolved still in firefox.

    The listed below code example also not working in firefox for us.

    var doc = new wjcCore.PrintDocument();

    doc.append(‘Welcome to Wijmo print’);

    doc.print();

    We are facing the following issues in firefox

    a) Application gets hanged once clicked the print button (print working at first time, next click or not able to click any element until refresh the page)

    b) Grids (wj-flex-grid) records or rows become empty in firefox after clicked the print button. We didnt get/retrieved the grid data even refreshed the page in firefox

    Environment details

    OS:- Windows 10 64-bit

    Browser:- Firefox 56.x.x

    Wijmo:- 5.20162.231 (Licensed Version)

    Angular:- Angular 2.x

    Package.json

    “wijmo”: “./Wijmo_5.2/NpmImages/wijmo-amd-min”,

  • Posted 20 May 2018, 5:43 pm EST

    Hi Raje,

    We are sorry, we are unable.

    Could you please check with the attached sample at your end?

    If the issue persist, please check it after updating Firefox to latest 60.0.1.

    ~Manish

    PrintDocument.zip

  • Posted 22 May 2018, 6:05 am EST

    Hi,

    Firefox issue is resolved when using "copyCss: false // prevent cross-origin bugs in jsfiddle " option for printDocument. But CSS (not applied) and images are also not loaded properly

    Thank You,

    Regards,

    Raje

  • Posted 22 May 2018, 7:37 pm EST

    Hi Raje,

    Setting copyCSS to false causes to not applying CSS.

    If you are referring css file from server which do not allow cross origin, then copyCss property should be set to false.

    Please refer to the updated sample.

    PS: Run the sample on server.

    ~Manish

    PrintDocument_CSS.zip

  • Posted 23 May 2018, 4:45 am EST

    Hi

    copyCSS set to true also not rendering the CSS and also images ( issue occurred in all browsers).

    For example,

    var doc = new wjcCore.PrintDocument({

    title: “Welcome to Wijmo print”,

    copyCss: true // prevent cross-origin bugs in jsfiddle

    });

    doc.append(“”);

    doc.print();

    Images are not loaded (or displayed) at second time in the above example.

    How to handle the img src tags in print document?

    Thank You,

    Regards,

    Raje

  • Posted 23 May 2018, 4:47 am EST

    Hi

    Change

    doc.append(“”);

    to

    doc.append(“”);

    Thank You

    Regards,

    Raje

  • Posted 24 May 2018, 12:49 am EST

    Hi,

    In the above sample, copyCss was working fine but the issue was with the import of bootstrap.min.css.

    Once you move your CSS reference before bootrap then everything should work fine.

    Images are not loaded (or displayed) at second time in the above example.

    We are sorry, we are unable to replicate the issue at our end.

    Please refer to the updated sample attached.

    ~Manish

    PrintDocument_CSS.zip

  • Posted 27 May 2018, 4:22 am EST - Updated 3 October 2022, 11:13 am EST

    Hi

    Images are NOT displayed (in Chrome and Firefox. IE throws an error) properly even i gave the correct path.

    For example

    var doc = new wjcCore.PrintDocument({

    title: “Welcome to Wijmo print”,

    copyCss: false // prevent cross-origin bugs in jsfiddle

    });

    doc.append(“”);

    doc.print();

    ( Please check this URL “https://stackblitz.com/edit/angular-wg72g3?file=app%2Fapp.component.ts” in INTERNET EXPLORER. )

    Thank You,

    Regards,

    Raje

  • Posted 27 May 2018, 7:58 pm EST - Updated 3 October 2022, 11:13 am EST

    Hi,

    We are sorry indeed but we are unable to replicate the issue at our end.

    We tried the sample on different browsers and had no issue.

    We also tried the link provided by you(also in IE) and had no issues with anything.

    Please check the attached gif and let us know if there is something else we need to do in order to replicate the issue.

    ~Manish

Need extra support?

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

Learn More

Forum Channels