Disclaimer: Only remove content restrictions from PDFs where you have the permission of the owner to do so.
Solution:
Open the PDF. Under Document Properties > Security > Security Method, change this to No Security.
Download pdfsam https://pdfsam.org/download-pdfsam-basic/.
Install pdfsam.
Open pdfsam and select "extract".
Drag and drop the PDF into pdfsam.
For the "Extract pages", use "1-{total pages}" where {total pages} are the total pages.
Click "Run".
Download qpdf (ming64 zip) from https://github.com/qpdf/qpdf/releases/tag/v11.8.0
Extract qpdf to a folder.
In the qpdf folder, create the batch file "clean.bat":
cd /d %~dp0
.\bin\qpdf.exe --decrypt "%1" "%~dpn1-clean.pdf"
pause
In Explorer, drag and drop the pdf onto the batch file. The decrypted pdf will have the word "clean" at the end.
Download PDF Arranger from https://github.com/pdfarranger/pdfarranger
Install PDF Arranger.
Open up a PDF in PDF Arranger.
Save the PDF.
All restrictions will be removed, but you may find that all the bookmarks and links no longer work.
Print to XPS. Then print the XPS back to PDF.
All restrictions will be removed, however you may find that even if the text looks OK but the text is greeked when copied and pasted.
Print to XPS or PDF in bitmap mode or print text as curves (see under Print Options > Advanced).
OCR the document in PDF Xchange Viewer or KoFAX (KoFAX has better OCR).
Solution:
Open the PDF.
Under Document Properties > Security > Security Method, change this to No Security.
Delete the last page. Sometimes the author includes special scripts on the last page.
Alternatively, disable JavaScript in the PDF reader application.