Bonjour eos-raf

Un script jsx si cela t interesse :

Code:
var startRulerUnits = preferences.rulerUnits;
var startTypeUnits = preferences.typeUnits;
preferences.rulerUnits = Units.PIXELS;
preferences.typeUnits = TypeUnits.PIXELS;
    
    
    var myDoc = activeDocument;
    var corrResolution = 92/myDoc.resolution;
    
    if(myDoc.width>myDoc.height){ basePourcent = myDoc.width; }
    else { basePourcent = myDoc.height;}
    
    var Pourcent = basePourcent/1000*corrResolution ; 
    var tailleFonte = 10*Pourcent;                    //modifier pour la taille de la fonte
    var TextInfo = "Watermark";                       //modifier le texte
    
    var couleur = new SolidColor();
    couleur.rgb.hexValue = 'ffffff';                  // changer la couleur en hexadecimal
    
    var newTextLayer = myDoc.artLayers.add();
    newTextLayer.kind = LayerKind.TEXT;
    newTextLayer.textItem.kind = TextType.POINTTEXT;
    newTextLayer.textItem.color = couleur;
    newTextLayer.textItem.font = "ArialMT";           //Modifier la police 
    newTextLayer.textItem.size = tailleFonte;
    newTextLayer.textItem.contents = TextInfo;
    newTextLayer.opacity = 70;                        //modifier l opacite du calque
    
    var LargeurTexte = (newTextLayer.bounds[2] - newTextLayer.bounds[0]);
    var hauteurTexte = (newTextLayer.bounds[3] - newTextLayer.bounds[1]);
    
    newTextLayer.textItem.position = [( myDoc.width - LargeurTexte - hauteurTexte/2  ), ( myDoc.height - hauteurTexte/2 )];
    
preferences.rulerUnits = startRulerUnits;
preferences.typeUnits = startTypeUnits;
:blink: