• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

pdfMake client side

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pdfMake client side

    Hi,

    I followed the DD session for client side PDF generation. And I am struggling with the last bit. The script seems to hang on the
    PHP Code:
    setAppVar('urlPdf'dataUrl); 
    statement.

    See attachment for complete script.

    Hope you can help.

    Kind regards,
    Theo



    Attached Files

  • #2
    Hi Theo,

    Looks like they didn't update the documentation when they changed "getDataUrl" from accepting a callback to returning a promise

    Example:
    Code:
    pdfDocGenerator.getDataUrl().then(function (dataUrl) {
        // update the appvar url so that the viewer shows the new
        // pdf report
        console.log('dataUrl retrieved');
        setAppVar('urlPdf', dataUrl);
        console.log('AppVar set');
        Valence.common.util.Helper.destroyLoadMask();
        success();
    }, failure);

    Comment


    • #3
      Hi Johnny,

      Yes that works, Very nice start of the weekend!

      Cheers,
      Theo​​​​​​​

      Comment

      Working...
      X