I recently faced this problem and solved it by Converting each page of the PDF to a rasterized image (of sufficiently high resolution)
Creating a new PDF whose pages consist of the images created in step 1.
Code here - https://gist.github.com/chrischute/881b039cb9db36994c8ec3a2fc0ff707