I'm using this example on my system, but this error occurs when I call print.
Function call
MainForm.WebForm.JSInterface.JSCode('html2canvas(document.querySelector("#' + MainForm.WebForm.JSId +'")).then(function(canvas) {ajaxRequest('#1', "getData", ["base64Data="+canvas.toDataURL()])});');
Error:
html2canvas(document.querySelector("#O121_id")).then(function(canvas) {ajaxRequest(O121, "getData", ["base64Data="+canvas.toDataURL()])});
I placed the files in a folder and added it within the code in the servermodule.
procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
begin
Self.CustomFiles.Clear;
if FileExists('.\files\css\capturar_telas\html2canvas.min.js') then
Self.CustomFiles.Add('.\files\css\capturar_telas\html2canvas.min.js');
end;