Jump to content

grupodatasoft

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by grupodatasoft

  1. On 9/13/2019 at 6:53 AM, Sherzod said:

    Hi,

    Can you try these steps?

    1. CustomFiles:

    files/html2canvas.min.js

    2. MainForm.Script:

    function canvasSaveAs(uri, filename) {
        var link = document.createElement('a');
        if (typeof link.download === 'string') {
            link.href = uri;
            link.download = filename;
            document.body.appendChild(link);
            link.click();
            document.body.removeChild(link);
        } else {
            window.open(uri);
        }
    }

    3. How to use, for example:

    procedure TMainForm.UniButton2Click(Sender: TObject);
    var
      fName: string;
    begin
      fName := 'capture' + FormatDateTime('ddmmyyyyhhnnss', Now);
      UniPanel1.JSInterface.JSCode(
        'html2canvas(document.querySelector("#'+ UniPanel1.JSId +'")).then(function(canvas) {'+
        '    canvasSaveAs(canvas.toDataURL(), "'+ fName +'");'+
        '});'
      );
    end;

    html2canvasFrm.png.7e024012d6bf894e78d202b984bb260f.png

    capture13092019101010.png.cf503316569051aa119f74de49ec231e.png

     

    Hi, this works great, it's amazing, thank you !!! Just one question: is there a way to automatically save the file to a specific path on the server without user intervention?

     

     

  2. Hi, i do install the last beta version of Unigui, all rigth, so, the TUniImageList not support PNG images, only BMP and ICO images, the prior version of UniGui not have the TUniImageList component, i use the conventional TImagelist, and all rigth, now with the new version of UniGui, the buttons nos accepted images from TImagelist, only accept from TUniImaleList but this componentet do not support PNG images.

     

    What i do?

    post-720-0-46672500-1337798372_thumb.png

×
×
  • Create New...