diff --git a/frontend/components/PdfViewer.tsx b/frontend/components/PdfViewer.tsx index 735fabf..1683b2a 100644 --- a/frontend/components/PdfViewer.tsx +++ b/frontend/components/PdfViewer.tsx @@ -149,7 +149,7 @@ export function PdfViewer({ const pageAspectRatio = viewport.width / viewport.height; const containerHeight = containerRef.current!.clientHeight - 80; // Leave space for controls - const containerWidth = containerRef.current!.clientWidth - 100; + const containerWidth = containerRef.current!.clientWidth - 32; // Account for p-4 padding (16px × 2) // Calculate width that would make 80% of page height visible const targetHeight = containerHeight * 0.8; @@ -328,7 +328,7 @@ export function PdfViewer({ {/* Scrollable PDF container with all pages */}
{Array.from({ length: totalPages }, (_, i) => i + 1).map((pageNum) => ( @@ -338,6 +338,7 @@ export function PdfViewer({ if (el) canvasRefs.current.set(pageNum, el); }} className="shadow-lg bg-white" + style={scale <= 1 ? { maxWidth: '100%' } : undefined} /> ))}