I need to be able to create an aspect to then sign a pdf from code, which is JS
A lot of people use an image of their signature. Just take a picture of your signature and crop it to the correct size.
Excuse me, but I do not understand
The "appearance" (aspectos) of the signature is either an image or text. This is what you asked about.
Sorry for not explaining well. I know how to apply an appearance to a digital signature, what I'm looking for is how to create an appearance from Js and then apply it to the signature
You cannot do that. JS has no functionality for creating appearances.
Do you have any idea how to do this? Because what I want to do is to be able to pass the path of an image and be able to sign pdf next to that image, this has to be by code
Stamp first then sign.
You can't script a new stamp image, at least not easily. I would be much quicker to use a button to display the image.