How to use time machine to recover a deleted pdf in iBooks?
You should be able to restore the PDF from the backup using the command-line technique I posted in How can I restore iBooks stored in iCloud from a Time Machine backup?

Find the most appropriate backup:

$ tmutil listbackups 
[...]
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-11-123506
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-13-224355


Check if your missing PDF is available:

$ ls '/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf'
/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf


This assumes you know the name of the file, but if not you can omit the file.pdf and you'll get the full listing for the directory.

Restore the file to your Desktop:

$ tmutil restore '/Volumes/Time Machine Backups/Backups.backupdb/macbook/2017-12-12-212807/Macintosh HD/Users/USERNAME/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents/file.pdf' /Users/USERNAME/Desktop/
Total copied: 7.89 MB (8270868 bytes)
Items copied: 1


Then you can add the PDF to iBooks again as normal.