How To Embed 3D PDF Into A Blog Post

I received a few comments to my post titled “How To Embed A 3D VIA Model Into A Blog Post“. One reader left a comment stating that he could not get the 3D VIA Player to show my model on his Mac. Later he posted an update stating that the player does not work on the latest 64 bit Mac OSX. Another reader lamented on the need to download yet another player. Well, since the 3D XML format is far from open, a proprietary player will always be required. Yet another user commented that the 3D VIA Player did not support Firefox 3.5 on ubuntu. Finally another reader started bitching about how the user had to be logged in as administrator before installing the player, which most users are not.

That was it. I knew there was something seriously wrong with this 3D VIA approach. The point of embedding 3D models into my blog posts, or for that matter any web page, was to make things easy for readers, not frustrate them. Instead of stopping at bitching, the last commenter went ahead and suggested that I use 3D PDF instead of  3D XML since just about everyone has the free Adobe Reader installed on their computers and which happens to work on just about every operating system (see the extensive list here). I thought this was a great idea and went about trying to figure out exactly how I could embed a 3D PDF into a WordPress blog post.

As it turns out, I needed a WordPress plug-in to embed objects into a blog post. I found one aptly titled Embed Object and it worked just fine. You should see my rose model inside a 400×300 Adobe Reader window immediately after this line.

If you don’t see it, please leave a comment and let me know which operating system and browser you are using.

All that you need to do is specify the URL of the PDF file and the width and height of the window that you want the Adobe Reader to squeeze itself into. The tag that you need to add to the text of your post is of the form:

[ embedded: src width height]

Note: You will need to remove the space between ‘[‘ and ‘embedded’.

However, there is something else that needs mentioning here. When the Adobe Reader is embedded into a web page it also comes with the toolbar, scroll bars and navigation pane. This takes up a lot of real estate and leaves hardly any space for the 3D model to display itself. There is a solution to this problem. The Adobe Reader accepts command line parameters which can be used to control how it behaves and looks. For example, if I want to open a PDF file in the Adobe Reader with the toolbar turned off I can type the following at the command prompt:

AcroRd32.exe /A “toolbar=0″ C:\Rose.pdf

where AcroRd32.exe is the name of the Adobe Reader executable and the string (in quotes) after /A contains the command line parameters. In the case above I set toolbar to zero, which has the effect of turning off the toolbar when the Reader starts up. Similarly, you can set up the Reader’s parameters when embedding it into a web page as well. This is done by supplying the parameters in the URL of the PDF file. So in order to hide the toolbar, scroll bar and navigation pane I use the following URL:

http://www.deelip.com/models/2010-05-01-Rose.pdf#toolbar=0&scrollbar=0&navpanes=0

If you want to know more about Adobe Reader’s parameters you can read this document published by Adobe way back in 2005 for Adobe Acrobat 7.0, but which is still valid today.

The only drawback I see with this approach is that you need to come up with a 3D PDF file to begin with, for which you need Adobe Acrobat Pro Extended which is priced at $699 or some other 3D PDF authoring software. I am not aware of any free 3D PDF creation software. If you know of any, please leave a comment. I will update this post with your information. The cheapest software I know what lets you create 3D PDF files from solid models is the $197 Alibre Design Standard.

  • Share/Bookmark

View Comments to “How To Embed 3D PDF Into A Blog Post”

  1. joe says:

    Doesn't work for me on OSX 10.6.3 using Safari 4.0.5

    This should be a good exercise to show you there is no universal anything on the internet before you jump to conclusions about what is seriously wrong with someone else's software.

  2. You are right. The list of supported OS's that I pointed to has 10.6.0 as the last supported version of Mac OS.

    Careful. I didn't say that there was something seriously wrong with the 3D VIA software itself. You seem to be jumping to conclusions regarding what I said. I said that there was something seriously wrong with the approach. I am trying to find the least painful approach here, not the best software or file format.

  3. Can't see the rose. Ubuntu 10.x, Google Chrome browser

  4. I can see it if I switch to the Firefox browser. Still running Ubuntu 10.x

  5. joe,

    Something just struck me. If Adobe claims that their Reader works with Mac OS 10.6.0, shouldn't it also work on 10.6.3? I mean, isn't the Mac backward compatible to the same minor version? After all, you are just using a different build of 10.6, right?

    Or maybe the problem likes with Safari. If possible, try a different browser and let me know.

    Stay safe. Use Windows. ;-)

  6. Alessandro says:

    Hi Deelip,
    I'm using Firefox 3.6.3 on windows XP HE SP3 32bit.

    I have foxit reader as default for pdf files, and of course Firefox use it to show your rose. Foxit does not support 3d visualization.

    If I say to both Firefox and Windows to use Acrobat Reader as default, it shows a blank window instead of the rose.

  7. Alessandro says:

    About 3d pdf printer, Solidworks has a built-it one. BTW, I use Alibre Design to create them.

  8. Correct. Foxit does not have the Adobe 3D PDFD Library (A3DLib.dll) and hence will not show 3D PDF's. You will need the Adobe Reader.

  9. Are you sure? I thought the SolidWorks PDF output was basically a 2D screenshot of the current graphics window.

  10. Alessandro says:

    Yes.

    I haven't SWX, just Solid Edge and Alibre so I can't be more accurate, but when you go to “save as” and choose pdf format, you will find a checkbox “save as 3d pdf” that will allow you to create a 3d pdf file.

  11. Alessandro says:

    Actually I have Adobe Reader, but I think there is something broken in my firefox setup because it doesn't recognize the instruction to use Adobe as default reader.

    Thank you for answering.

  12. Alessandro says:

    I don't know if it was already commented, but have a look at this page, it does'nt require any plugin:

    http://freewheel.labs.autodesk.com/index.aspx

  13. Yes, SolidWorks does have a 3D PDF export option.

  14. Maybe if you set up Adobe Reader as the default application to open PDF files, then Firefox will fire it up as well.

  15. Freewheel is interesting. I had a look at it a while ago. It is a service actually, not a software. Moreover, it’s a labs project. So you really don’t know which direction it's headed. I mean whether it will be free or not once it graduates from Labs.

  16. Alessandro says:

    It works with Mandriva Linux 2010 64 bit. Firefox 3.6.3 and Adobe Reader Rel.8.

    Very nice!

    Regards.

  17. Alessandro says:

    I was studying Salome (http://www.salome-platform.org) that runs natively on linux, even if there is a beta version for windows. In the meanwhile I worked a few on the operating system to have the reader working.

    In order to have pdf adobe plugin working on a 64-bit linux, it is necessary to have nsplugiwrapper installed, and activate it with this command:

    nspluginwrapper -i /opt/Adobe/Reader8/Browser/intellinux/nppdf.so

  18. Marijn says:

    [Bitchmode] I need to download an adobe plugin and since the pdf reader is bloathware I don't want any Adobe plugins slowing down my browser so I can watch once in a week a 3d model.[/bitchmode]

blog comments powered by Disqus