0
Files
app/workspace/page.tsx
"use client";

import dynamic from "next/dynamic";

// embedpdf's plugin packages and the PDFium worker are browser-only, so the
// whole app is loaded client-side behind an `ssr: false` boundary.
const PdfWorkspaceApp = dynamic(
  () =>
    import("@/components/pdf-workspace-app").then(
      (mod) => mod.PdfWorkspaceApp,
    ),
  {
    ssr: false,
    loading: () => <div className="bg-muted h-full w-full" />,
  },
);

export default function Page() {
  return (
    // The workspace fills its container and scrolls inside itself, so pin an
    // explicit height here rather than letting the document grow the page.
    <div className="h-svh w-full overflow-hidden">
      {/* Two documents so the tab strip and the split panes have something to
          work with from the first frame. */}
      <PdfWorkspaceApp
        documents={[
          { url: "/sample.pdf", name: "sample.pdf" },
          { url: "/form.pdf", name: "form.pdf" },
        ]}
      />
    </div>
  );
}

Every document opens as a tab, and any view splits into resizable panes for side-by-side reading — each pane a self-contained viewer, with the shared sidebar following whichever pane you're working in. It's built on embedpdf's view-manager.