How to create Annotation with background image and text over it

I need to show annotation on PDF file with background image and text over it.

Right now StampAnnotation show only image and FreeTextAnnotation used for only showing text.

Custom annotation is confusing to use. There is no resource for complete example.

There is no trivial way to this because the PDF specification does not support it, except for some of the pre-defined Stamp annotations.

So you would have to make a custom appearance (and there are a few different ways to do this) but if later on someone were to resize, or make any changes (except to move) to the annotation, then you would lose the custom appearance and the default (if any) would appear.

Perhaps you could elaborate on what exactly you want to accomplish.
Could you provide a screenshot/image of an example?
Where does the image come from?
Where does the text come from?
Do you expect anyone reading the PDF to be able to resize/move/edit the annotation?

Hi Ryan

Could you provide a screenshot/image of an example?
updated

Where does the image come from?
It can come from url

Where does the text come from?
Dynamic text add the time of PDF clear

Do you expect anyone reading the PDF to be able to resize/move/edit the annotation?
Resize and move - Yes
Edit- No

FYI I am using pdfjs express lib.

Thanks
Ravi

FYI I am using pdfjs express lib.

In that case it would be best to pose your question there, since the APIs are different.

Note that your image in this post did not go through, so when posting in the forum above double check your screenshot.