DEV Community

loading...

Discussion on: Edit PDF files with Python

Collapse
expoashish profile image
Ashish Yadav

Traceback (most recent call last):
File "main.py", line 5, in
can = canvas.Canvas(packet, pagesize=letter)
NameError: name 'packet' is not defined

what is packet here?????????????????

Collapse
stokry profile image
Stokry Author

Ohh thank you, I made one typo, I updated my code: this part was missing:

packet = io.BytesIO()
Enter fullscreen mode Exit fullscreen mode
Forem Open with the Forem app