Could not find how to do it with qpdf or pdftk or even a gui tool.

Edit: Solution pdftk A=oldpdf.pdf cat A output newpdf.pdf This removes all metadata and also the attachments.

  • antihero@lemm.eeOP
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    I am talking about removing them from pdf. For extracting them this works pdftk [pdf_file.pdf] unpack_files.

    • Fox@pawb.social
      link
      fedilink
      English
      arrow-up
      4
      arrow-down
      1
      ·
      1 year ago

      I’ve used LibreOffice Draw before to remove content from PDF files without reprinting

      • antihero@lemm.eeOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        1 year ago

        Yes but in my case the pdf file is big and I libreoffice draw hangs. Also i found another solution (added that to post).

    • worfamerryman@beehaw.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Oh in that case. Let me look up an open source tool I’ve used for PDFs before. It might be able to do it.

      It’s called pdfsam.

      I’m not sure if it can do what you are asking, but I think it will do the trick.

      You might be able to use the convert function of ffmpeg to extract the pages as png and then recreate a new pdf from the pngs that were extracted, but this may not work for your specific file.