Which product are you using?
PDF.js Express Plus 8.7.4
Detailed description of issue
As I understand Express Plus doesn’t have a ‘forms’ toolbar in default header settings.
I’m trying to add ‘forms’ to the toolbar menu in header
using method:
instance.UI.setToolbarGroup(instance.UI.ToolbarGroup.FORMS)
but it only added as an active toolbar (and I can see it in the first loading of the page and when I click on another toolbar it disappears)
Also while I’m trying to select an area for the creating new form
it returns an error in the console
Cannot read properties of undefined (reading 'READ_ONLY')
Expected behaviour
I want to see and use ‘forms’ in my viewer
Does your issue happen with every document, or just one?
yes
Link to document
{Provide a link to the document in question if possible}
Code snippet
WebViewer(
{
disableFlattenedAnnotations: true,
path: `${process.env.VUE_APP_PUBLIC_URL}/pdfjs-express`,
licenseKey: process.env.VUE_PDFJS_EXPRESS_TOKEN!,
config: `${process.env.VUE_APP_PUBLIC_URL}/pdfjs-express/config.js`,
},
quickSignViewer.value!
).then((instance: WebViewerInstance) => {
const { documentViewer, annotationManager, Tools } = instance.Core
// try to add 'forms' in toolbar
instance.UI.setToolbarGroup(instance.UI.ToolbarGroup.FORMS)
// Try to fix an error ` Cannot read properties of undefined (reading 'READ_ONLY')`
annotationManager.disableReadOnlyMode()
annotationManager.promoteUserToAdmin()
annotationManager.enableRedaction()
annotationManager.enableCreationOverAnnotation()
....
})