Open KaboChow opened 1 month ago
Hi Team, I am trying to use the following JS code to convert the obtained non_stoking.color into RGB color for use in HTML. `
if(fillColor.length===1){ return 'rgb(' + (255*(1.0-fillColor[0])).toFixed(0) + ')'; } if(fillColor.length===3){ const r = 255 * fillColor[0]; const g = 255 * fillColor[1]; const b = 255 * fillColor[2]; return 'rgb(' + r.toFixed(0) + ',' + g.toFixed(0) +',' + b.toFixed(0) + ')'; } if(fillColor.length===4){ const r = 255*(1.0-(fillColor[0]+fillColor[3])); const g = 255*(1.0-(fillColor[1]+fillColor[3])); const b = 255*(1.0-(fillColor[2]+fillColor[3])); return 'rgb(' + r.toFixed(0) + ',' + g.toFixed(0) +',' + b.toFixed(0) + ')'; }
`
But there are obvious color differences in the obtained colors. pdf: html:
This is the PDF I used for testing: TEST 5 - 48in-Height-Chef-Supplies-Banner-d4-ced6f345009972ad3e50309422be6654.pdf
Does anyone know how to solve it? thank you
hi, maybe you can try pymupdf.
Thanks!@jollyfish-cjy pymupdf looks like it has a lot more interesting features, I will give it a try
Hi Team, I am trying to use the following JS code to convert the obtained non_stoking.color into RGB color for use in HTML. `
`
But there are obvious color differences in the obtained colors. pdf: html:
This is the PDF I used for testing: TEST 5 - 48in-Height-Chef-Supplies-Banner-d4-ced6f345009972ad3e50309422be6654.pdf
Does anyone know how to solve it? thank you