How to Solve NameError: name 'Pdf' is not defined -- pikepdf

Solution: Import the 'Pdf' module

To Solve the error, add the following line to the top of your code.

from pikepdf import Pdf

 

For more information:
Python pikepdf Pdf