1
0
-1

Hello,

I created a widget HTML field into an uniface form. The widgetoperation load an html based on library javascript allowing to create charts.

Everything works well except the exporting part. The library javascript that I used (as a lot) allows to export chart as PNG/SVG/PDF format. It works well when I test it in a separated browser (the file is exported into the download folder) but nothing happened when I click on the export button in uniface ?

Do you know where is the problem ? Is there a parameter somewhere to fill ?

PS: I work on uniface 9.7

Thanks


    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      We use

      <script src="js/dom-to-image.js"></script>
      
      

      to make a "screenshot" and send the data as base64-encoded to Uniface

      window.unifaceTriggers("T_PRINT", dataUrl);
      
      
        CommentAdd your comment...
      1.  
        1
        0
        -1

        The HTML widget uses the cefrender (Chrome) engine, I have done a quick google, and I can't find a specific statement about how to support (or even if possible) downloads in the page. 

        What we have done internally is to link the download button to a uniface extended trigger) and then used file operations to load/save the associated data. This relies on the fact that our displayed data is internal (so we have access to the original (pdf) file). 


        Iain

          CommentAdd your comment...