diff --git a/models/sign_document.py b/models/sign_document.py index 750d6c0..0365271 100644 --- a/models/sign_document.py +++ b/models/sign_document.py @@ -33,6 +33,7 @@ class SignDocument(models.Model): # 3. Load the base output into PdfFileReader # base_output is a BytesIO try: + base_output.seek(0) # IMPORTANT: Reset stream position to start base_pdf = PdfFileReader(base_output, strict=False) except (ValueError, PdfReadError): # Should not happen if super succeeded, but safety first