DEV Community


Discussion on: Edit PDF files with Python

expoashish profile image
Ashish Yadav

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

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

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