Search code examples
pythonpdfmetadatapikepdf

using pikepdf in python


After installing pikepdf, while trying code with pikepdf, I am getting error messages as below :

enter image description here


Solution

    1. It's Pdf, not pdf. Use:
    from pikepdf import Pdf
    
    1. Using from pikepdf import ... does not actually import pikepdf itself. Run this to load it:
    import pikepdf
    
    1. It's Pdf.open() not pikepdf.open()

    It seems best for you to review the docs for pikepdf.