Added functionality to maintain the scroll position and viewport center of the `.pdf-frame` container during PDF page rendering. This ensures the user's view remains centered on the same content after re-rendering, even if the canvas dimensions change. Implemented logic to store the scroll position and viewport center before rendering and restore them afterward using scaling factors calculated from the canvas's old and new dimensions.
8.0 KiB
8.0 KiB