Short answer: drop the locked PDF, type its current password, download the unlocked copy. If the password is wrong the library refuses and no file is produced — that is the whole behaviour, and it is why this is not a cracking tool.
Decrypted, not rebuilt
The file is not re-printed or re-rendered: qpdf removes the encryption layer, so text stays selectable, images keep their original compression and bookmarks survive. A rebuilt PDF would look the same and lose all of that, which is why the rebuild approach is worse even when it looks identical on screen.
After you unlock it
The output has no password at all — anyone who receives it can open it. If the file is going to someone else, lock it again with a password you are happy to share, and consider stripping the metadata that names your machine or your tool.