File Tabs
Keep your application tab UI synchronized with open files inside the Canvas.
File Tabs allows you to synchronize your host application tab bar with the list of open files inside the viewer.
Canvas manages the active list and selection order. Treat the fileTabs event stream as the single source of truth for rendering your tab headers.
- Instant Synchronization: Your UI updates dynamically when documents are opened or closed.
- Two-Way Interaction: Switch active tabs programmatically using the SDK, or let Canvas manage tab changes internally.
- Detailed Headers: Access document titles, index order, and format icons (PDF, CAD, Image).
Subscribe to tab changes and switch active documents programmatically:
Switch active tab index
Listen for tab modifications
Synchronizing tab selections flows through standard SDK callbacks:
1. Host Selects Tab Index
When the user selects a tab header, the host triggers the active file index method.
2. Canvas Returns Tab List
Canvas updates the view, compiles the tab state, and broadcasts the fresh array.
Copy these project setup files to configure tab listening, tab rendering, and tab switching handlers:
Synchronize active files and open lists inside a React custom state bar component:
Synchronize active files and open lists inside a Vue Composition template:
Synchronize active files and open lists inside an Angular component model:
Try the interactive preview below to see how events flow between the host and the canvas.
Interactive Workbench
File tabs preview
Open multiple files one at a time and monitor the tabs emitted by the Canvas.
Keep tab sync connected to file payload references.
- Canvas Setup: Canvas Iframe Initialization
- File Upload: File Upload
- File API: API References
