Bobinas P4G
  • Login
  • Public

    • Public
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Tagomago (tagomago@mastodon.social)'s status on Wednesday, 01-Jun-2022 20:19:48 UTC Tagomago Tagomago

    Oh... pdfcrop works great, but also removes the metadata table of contents from PDFs.

    Any other tool for cropping PDFs that keeps TOCs? Or maybe one that can export/import TOCs?

    In conversation Wednesday, 01-Jun-2022 20:19:48 UTC from mastodon.social permalink
    • Tagomago (tagomago@mastodon.social)'s status on Wednesday, 01-Jun-2022 20:24:39 UTC Tagomago Tagomago
      in reply to

      Maybe I'll simply use Calibre to convert PDF->ePub->PDF and set the margins to zero.

      In conversation Wednesday, 01-Jun-2022 20:24:39 UTC permalink
    • Tagomago (tagomago@mastodon.social)'s status on Thursday, 02-Jun-2022 08:17:49 UTC Tagomago Tagomago
      in reply to

      Calibre was a bit of a mess, so I finally used pdfcrop and pdftk, another great tool.

      Dump the metadata:

      pdftk orig.pdf dump_data output orig.info

      Then pdfcrop the original pdf:

      pdfcrop --margin '0 0 0 0' orig.pdf crop.pdf

      Then get the cropped metadata to maintain the box size:

      pdftk crop.pdf dump_data output crop.info

      Then manually edit the metadata (copy-paste the original bookmarks section).

      Then finally apply that new metadata:

      pdftk crop.pdf update_info crop.info output final.pdf

      In conversation Thursday, 02-Jun-2022 08:17:49 UTC permalink

      Attachments


      1. https://files.mastodon.social/media_attachments/files/108/406/882/265/114/269/original/851d0bb6ab0706d9.jpeg
    • Tagomago (tagomago@mastodon.social)'s status on Thursday, 02-Jun-2022 08:20:22 UTC Tagomago Tagomago
      in reply to

      I should post this kind of notes on a blog for my future self, I guess...

      In conversation Thursday, 02-Jun-2022 08:20:22 UTC permalink
    • aab (aab@khp.ignorelist.com)'s status on Thursday, 02-Jun-2022 09:01:55 UTC aab aab
      in reply to
      • Tagomago
      @tagomago I see you've got it... Have you ever tried LibreOffice Draw for this? I don't know if it messes with metadata, but certainly it helps with manipulation...
      In conversation Thursday, 02-Jun-2022 09:01:55 UTC permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • Privacy
  • Source
  • Version
  • Contact

Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.