Reconcile Document PDF Viewer

Overview

For use cases when needing to display bounding boxes within a pdf and provide auto-scrolling to those locations from interface actions.

Key Features & Functionality

Parameters:

  • documentUrl - URL of document using document(<id>, "url")
  • boundingBoxesDocumentUrl - URL of document using document(<id>, "url"), use either this or boundingBoxes
  • boundingBoxes - List of bounding boxes dictionaries containing an id and geometry (top, left, width, height), use either this or boundingBoxDocumentUrl
  • interactionId - value that should be incremented with each action outside of the component plugin that should force the component plugin to update, for example updating a highlightedBoxId to force scrolling.
  • highlightedBoxId - The ID of the bounding box that should be highlighted in the component plugin. If interactionId is updated alongside this value, the UI will scroll.
  • clickedBoundingBox - The ID of the bounding box that the user clicked within the component plugin

Example Usage:

reconcileDocumentViewer(
documentUrl: document(
<docId>,
"url"
),
boundingBoxes: {
a!map(
id: "<bounding box ID>",
text: "<text in box (used for search)>",
pageNumber: <page number of box>,
geometry: {left: <left coord>, top: <top coord>, width: <width>, height: <height>}
),
...more bounding boxes
},
interactionIdValue: local!interactionId,
interactionIdSaveInto: local!interaction,
highlightedBoxId: ri!highlightedBox, 
clickedBoundingBox: ri!selectedBox
)

Anonymous
Parents Comment Children
No Data