Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/20/22 in all areas

  1. 1 point
  2. It worked master, once again, thank you very much. hug.
    1 point
  3. function childtap(sender, location, eOpts) { if (location.sourceElement && location.sourceElement.className == 'far fa-trash-alt') { //ajaxRequest(sender, "_tap", []) alert(location.record.data[12]); } } data: 0: 3 1: "APART" 2: 0 3: "USD" 4: true 5: 2 6: 2 7: 15 8: "" 9: "/files/img/nopicture100.png?20012022125058" 10: "" 11: "Region1/Region2" 12: "STREET2" 13: 140 14: 46 15: "" 16: "#000000" 17: 181 18: "32/20/12"
    1 point
  4. Thank you very much, @Sherzod İ will try weekend your solution proposal and will inform you Best Regards,
    1 point
  5. we know the enormous challenge that you and your team face every day, we trust in your work.
    1 point
  6. Hello, You can try this approach: 1. uses ... Soap.EncdDecd; 2. procedure TMainForm.UniButton1Click(Sender: TObject); begin with UniButton1 do JSInterface.JSCode('html2canvas(document.querySelector("#' + JSId +'")).then(function(canvas) {ajaxRequest('#1', "getData", ["base64Data="+canvas.toDataURL()])});'); end; 3. procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var stream: TBytesStream; base64s: string; AUrl: string; begin if EventName = 'getData' then begin base64s := Params.Values['base64Data']; base64s := StringReplace(base64s, 'data:image/png;base64,', '', [rfReplaceAll]); stream := TBytesStream.Create(DecodeBase64(base64s)); try stream.SaveToFile(UniServerModule.NewCacheFileUrl(False, 'png', '', '', AUrl, True)); UniImage1.Url := AUrl; finally stream.Free; end; end; end; 4. CustomFiles: files/html2canvas.min.js
    1 point
×
×
  • Create New...