Imagine you want to use the PDF viewer to show PDF files on which a user can add custom elements (e.g. signatures on a document that needs to be signed).
That would require specific functionality:
- Allowing to add a new item by e.g. calling a function (which can be linked to a button outside the PDF UI)
- Allowing the user to move around the added item
- Right click on the item to get options (e.g. configure the item or delete it)
- Read from external code the list of these items and get the page number on which they are located as well as their coordinates.
Is that something you see feasible with this viewer?
This sounds very much like a bespoke kind of annotation. However, it seems these added “items” would be external to the PDF so not really annotations. What would these items look like?
Have I understood this correctly?
You can image them as e.g. a rectangle on the PDF where a signature should be placed. We just need this as a way to:
- Get the coordinates where the signature field should be (the signature itself is later on handled by e.g. DocuSign or similar).
- Allow the user to drag it around in the document
- Click on it and call custom code to configure the field
- Delete the field
- Resize the field
It’s pretty much the same as what solutions like DocuSign allow you to do to define where a user will need to sign a document.
Got it - this is basically like the “area selector” when you are creating an area to redact then. You drag a rectangle around the page.
However what you would need would be an action when you click on it then it triggers some custom code.
Would you expect this “area section” to save with the PDF or just be a runtime session kind of thing?
It would be just a runtime session kind of thing.
Understood. I will put this on the product backlog as follows:
- Allow the user to draw a rectangle on the page
- Allow the user to move the rectangle
- Allow the user to delete the rectangle
- Allow the user to click on the rectangle (or on an associated “confirm” icon) to set the rectangle
- Once “confirmed”/“set” allow the triggering of customer defined code
Do you think there is anything missing in that summary functionality?
Size constraints for the rectangle would also be useful as well as setting e.g. the color / font / border.