1

I want to view the contents of a PDF file - but not so much in the sense of rendering the pages in it. Rather, I want to see the hierarchy of objects, the PDF-structural tags and fields like the encoding, the "Length X Y Z" fields, font descriptors, etc. etc. It would be even better if I could see both the rendered content and the unrendered structure, perhaps with some highlighting of what a piece of the PDF structure has an effect on.

Required features:

  • Gratis
  • Runs on Linux

Desired features:

  • Libre
  • Multi-platform
  • Supports recent versions of the PDF standard
  • Actively maintained
  • Non resoure-heavy
  • Responds quickly

2 Answers 2

1

You can use cpdf -output-json [-output-json-content-streams] in.pdf -o out.json. qpdf has similar functionality but without the ability to parse the content streams. You can alter the JSON file, then round-trip it back to PDF with cpdf -j in.json -o out.pdf.

2
  • 1. Link to cpdf website? 2. More information about what cpdf is generally? 3. Can I get the json with the actual content octets? i.e. just the structure?
    – einpoklum
    Commented Feb 24, 2023 at 16:22
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Feb 24, 2023 at 17:46
0

There are:

  1. iText RUPS (Source code)
  2. XFINIUM.PDF Inspector

Each one covers some of the features you are interested in.

Note: I work for the company that develops the XFINIUM.PDF Inspector

5
  • XFINIUM.PDF Inspector is not open source but it is free both for personal and commercial use. The XFINIUM.PDF library is a different product. Commented Nov 9, 2022 at 11:58
  • Oh, ok, sorry, I misread the website I guess.
    – einpoklum
    Commented Nov 9, 2022 at 12:17
  • So, does XFINIUM inspector run on Linux? I only see a Windows download.
    – einpoklum
    Commented Nov 10, 2022 at 8:25
  • No, just Windows Commented Nov 14, 2022 at 6:50
  • Well, I specifically asked for something which works on Linux. That's part of the problem with closed-source software, you're stuck with whatever platform they were originally built for.
    – einpoklum
    Commented Nov 14, 2022 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.