Forge Viewer PDF extension allow Document Browser to stay docked to side
I would like to keep the document browser docked to one side of the viewer with the thumbnails visible and no option to collapse the menu.
export const initializePDF = async (url: string) => {
const viewerDiv: any = document.getElementById("MyViewerDiv");
const viewer = new Autodesk.Viewing.GuiViewer3D(viewerDiv);
var options = {
env: "Local",
useADP: false,
};
Autodesk.Viewing.Initializer(options, () => {
viewer.start();
if (!url) console.log("error loading PDF");
viewer.loadExtension("Autodesk.PDF").then(() => {
viewer.loadModel(url, { page: 3 });
viewer.loadExtension("Autodesk.Viewing.MarkupsCore");
viewer.loadExtension("Autodesk.Viewing.MarkupsGui");
viewer.loadExtension("Autodesk.DocumentBrowser");
});
});
};
Read more here: Source link