fix: Reset PDF stream position to the beginning before reading to ensure correct processing.
This commit is contained in:
parent
b234d8a7d0
commit
8910c89cab
@ -30,6 +30,7 @@ class SignDocument(models.Model):
|
||||
return base_output
|
||||
|
||||
try:
|
||||
base_output.seek(0) # IMPORTANT: Reset stream position to start
|
||||
base_pdf = PdfFileReader(base_output, strict=False)
|
||||
except (ValueError, PdfReadError):
|
||||
return base_output
|
||||
|
||||
Loading…
Reference in New Issue
Block a user