Help! How do I extract 3D objects from PDFs?

You know how the Democratic People's Republic of Korea is neither democratic, nor particularly for the people, nor a republic? Yeah, so it turns out the "Universal 3D" format is pretty far from Universal!

A little backstory... The Europeana Carare Project has some gorgeous 3D scans of ancient monuments and heritage sites. The only problem is that the 3D files are trapped inside PDFs. Yup - did you know the PDF spec supported 3D models? Me neither.

The only way to view these is with the Official Adobe Viewer (install it on Linux following these instructions).

This is what it looks like:

Nifty, right?

So, how do we extract that 3D file?

  1. Download and install the Pythong PDF Parser
  2. Search for the 3D object:
    ./ -t /3D input.pdf
  3. You'll get a response like this:
    obj 48 0
     Type: /3D
     Referencing: 58 0 R, 59 0 R
     Contains stream
        /AN 58 0 R
        /Length 6066066
        /Subtype /PRC
        /Type /3D
        /VA 59 0 R
  4. The Object ID (in this case 48) is what we need to extract.
  5. ./ -o 48 -d output.u3d input.pdf

You can download the U3D file.

Unfortunately, nothing opens it. I've tried Meshlab, Blender, FreeCAD, i3D Converter, online service Babel3D, and even Unity 3D on a Windows box.

Nothing! Not a single application would recognise it - let alone convert it.

There is a U3D library on GitHub - but I'm not skilled enough to integrate it into anything.

I've found an Android app which claims to convert U3D files - but it has no downloads, no reviews, and costs £6!

So, gentle reader, if you know of a way to extract and view 3D models from PDFs, please let me know!

18 thoughts on “Help! How do I extract 3D objects from PDFs?

    1. Really? Would you mind explaining how you did it? I couldn't get Babel to work - and I don't think Glovius have a Linux version.

    1. Sadly I can't get that to work in Linux. Are you able to share any of the 3D models?

  1. Sorry Im not a coder but an artist and I need to extract a 3d model from a pdf.
    I don't understand much about coding and all, so can you explain to me how to proceed in layman's terms?

    -I downloaded python
    -Opened IDLE and I ran the program
    -A window with some help instructions opens

    Now, I tried your line of code "./ -t /3D input.pdf" and it didn't work, even if I change the /3D input.pdf to /my_pdf_file.pdf ,
    I tried to use it without the "." in the beginning as well, to no avail.
    I've tried using just " -t pdf-file.pdf" and variations like " -t /c/folder/pdf-file.pdf" or " -t /folder/pdf-file.pdf" to no avail.

    My pdf is inside the directory C:TestFolder. How can I access it with the -t command in

      1. But you were able to extract the U3D from the PDF right? Can you explain with a little more detail the usage of Pythong PDF Parser? I can't even make it find the pdf, none of the commands worked...

      2. Terence is using it in Linux, you (Luiz) are using it in Windows. Just don't write the "./" at the beginning. I think though that the Parser is not extracting the U3D correctly, casue I'm not able to reembed the U3D in a new PDF.

    1. Doesn't work on Linux and appears to require an obsolete version of Adobe Acrobat...

  2. Yeah, that seems to be the problem. The 3D object is actually in the PRC format. I'd no luck finding a PRC viewer nor a converter. But you should try extracting the geometry from the 3d pdf as PRC file and keep it until you find a software that reads it

    1. Definitely works with Photoshop CC. Import 3D object from PDF (see PDF import settings) than you can export a 3D layer (3D menu in PS) as .obj or colada (.dae)

      1. Sadly Photoshop doesn't work on Linux. If you can extract the files - could you share them?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.