brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
696 stars 529 forks source link

jSignature and print.css #38

Closed FrancoisM closed 11 years ago

FrancoisM commented 11 years ago

Hi,

I'm using a dark theme where the text color is white. So the signature is white. However, when I print, I'd like to change the color to black. I use a css file for printing and can change the text color to black but not the signature which remains white. Tks.

François

brinley commented 11 years ago

The signature colour can't be change via CSS, you'll probably need to run some additional JavaScript code on the canvas to change the colour. What you may have been able to change is the canvas background colour via CSS.

brinley commented 11 years ago

I've just implemented a new updateSetting call which you can use to change the text color.

Essentially in the latest version, you can now do

$("#signature").jSignature("updateSetting", "color", "red", false);

Where the last parameter if false will try to apply the setting on the existing strokes in the canvas, if true then the setting will only affect new strokes.

I'm not sure if this will help, perhaps you need to open the page in a hidden iframe, use javascript to export and import the signature into that hidden iframe, run the updateSetting to change the colour and background then print it.

FrancoisM commented 11 years ago

A bit too cumbersome for my problem but tks anyway.