I am fetching a PDF from the backend. At the bottom of this PDF there is a place to draw signature (sort of a contract).
I want to place a clickable rectangle on top of the signature line, then allow users click it in order to insert their signature (For the signature pad I’m using another package, I just want to draw that rectangle where it needs to be)
Is it possible to do it?
I tried wrapping the <embed>
with a container and using position: absolute;
, however that doesn’t work because the <embed>
is scrollable inside the container so the rectangle is not relative to the container.
Or maybe I need a completely different approach for that to work (without using <embed>
at all?)
position:absolute
does not work on its own.
You need to apply position:relative
to the <embed>
. Then the signature box will be placed inside the <embed>
the way you want.
Refer this video to gain more context-https://www.youtube.com/watch?v=jx5jmI0UlXU&list=PLc53ZvuYV0mXcIWVtXAlDxfo7rh_CmNzo