Jump to content

Marione97

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Marione97

  1. Hi, thanks for your support, i was able to convert the print from Grayscale through Ip Address.
  2. Hi,I corrected the error but it doesn't work
  3. I tried this script but the print result is in color from the SRV0010 function printJobHook(inputs, actions) { if (iinputs.job.clientMachine == "SRV0010") { actions.job.convertToGrayscale() } }
  4. Hi, I'm not understanding ... what should I do to convert the prints arriving from the SRV0010 from color to grayscale?
  5. Hi, i tried to insert the script but it doesn't work on Papercut, the prints from that server sent in color come out like this
  6. Hi, I mean that we have this specific Vm where there is our management system, this VM is on a physical server, we would like all the prints sent from them to convert to black and white
  7. Hi, I need help, I have to write a javascript script that allows my company to convert color prints to black and white when they are launched only from one of our servers, only from that server should they automatically become black and white. At the moment I only found this script that allows you to convert from color to B / W. const img = document.getElementById("eeveelutions"); const canvas = document.getElementById("canvas"); const ctx = canvas.getContext("2d"); img.onload = function () { img.crossOrigin = "anonymous"; ctx.drawImage(img, 0, 0); const imgData = ctx.getImageData(0, 0, canvas.width, canvas.height); for (i = 0; i < imgData.data.length; i += 4) { let count = imgData.data[i] + imgData.data[i + 1] + imgData.data[i + 2]; let colour = 0; if (count > 510) colour = 255; else if (count > 255) colour = 127.5; imgData.data[i] = colour; imgData.data[i + 1] = colour; imgData.data[i + 2] = colour; imgData.data[i + 3] = 255; } ctx.putImageData(imgData, 0, 0); };
×
×
  • Create New...