diff --git a/src/component/main/InnerNMRiumContents.tsx b/src/component/main/InnerNMRiumContents.tsx index 5f14e12198..e3ebd5b225 100644 --- a/src/component/main/InnerNMRiumContents.tsx +++ b/src/component/main/InnerNMRiumContents.tsx @@ -60,6 +60,22 @@ const containerStyles = css` -o-user-drag: none; user-select: none; } + + @media print { + @page { + size: a4 landscape; + margin: 0%; + } + + * { + visibility: hidden; + } + + #nmrium-viewer, + #nmrium-viewer * { + visibility: visible; + } + } `; interface InnerNMRiumContentsProps { diff --git a/src/demo/Sidebar.tsx b/src/demo/Sidebar.tsx index 770523896c..077b705ca1 100644 --- a/src/demo/Sidebar.tsx +++ b/src/demo/Sidebar.tsx @@ -102,6 +102,7 @@ function Sidebar(props) { return (
div > div:first-child { + display: none !important; + } + + .demo-main-container, + .demo-main-container > div { + width: 100% !important; + margin: 0 !important; + padding: 0 !important; + } +} + .rc-menu { border: none !important; box-shadow: none !important; diff --git a/src/demo/layouts/Admin.tsx b/src/demo/layouts/Admin.tsx index c9e09acf03..286f37bfbc 100644 --- a/src/demo/layouts/Admin.tsx +++ b/src/demo/layouts/Admin.tsx @@ -71,6 +71,7 @@ export function Dashboard(props: DashboardProps) { onMenuToggle={toggleMenu} />