import React, { useContext } from 'react'; import PageContext from '../context/PageContext'; import { saveAsPdf } from '../utils'; const PageController = () => { const pageContext = useContext(PageContext); const { pageRef, panZoomRef } = pageContext; const zoomIn = () => panZoomRef.current.zoomIn(2); const zoomOut = () => panZoomRef.current.zoomOut(2); const centerReset = () => { panZoomRef.current.autoCenter(1); panZoomRef.current.reset(1); }; return (