I discovered today that its possible to center a Rich Media Annotation in Acrobat 10. A “Rich Media Annotation” is Adobe’s fancy way of referring to a video or embedded flash movie. The significance of this is due to the fact that there currently is no way to do this within Acrobat Professional. You will have to edit the uncompressed PDF in a text editor and drop in some code per instance of your rich media item. You’ll want to use a decent text editor such as Notepad++ or Ultraedit.

I’m assuming that you have already placed your video in your PDF and that it is set to be a floating video.

First thing that you need to do is to save the PDF in question as an uncompressed PDF document. To do this, open up the Tools Pane by clicking on the “Tools” button. Next, click on the “Print Production” button to expand its contents and then finally click on the button labeled “Preflight”.

After the “Preflight” window opens you will need to click on the “Select Single Fixups” buttons which looks like a wrench icon as noted below:

Once the “Select Single Fixups” icon has been clicked the window will update with a list of new options. Click the “Document” row to expand its contents then locate the line that says “Remove document structure compression”.

Finally you’re ready to apply the fixit – click the “Fix” button in the lower right corner and you will have the opportunity to save the uncompressed PDF.

Next, open the uncompressed PDF in your text-editor of choice – I’ll be using Notepad++.

After the XML at the top of the document you’ll want to pay attention to the PosScript tags. The tags start with a forward slash. You can indent or put a newline before the tag – so code formatting is ok but is largely absent as you will see.

There is a construct referred to as a dictionary object. It is identified by opposing double less than/greater than signs which itself contains tags and values. A sample dictionary object might appear like so:

  /Name<</Name value/Name value>>

With that said we have a new tag/dictionary object to add to each video instance within our uncompressed PDF document. The code that we’ll be adding is the following:

<< /Type /RichMediaPosition
   /HAlign /Center
   /VAlign /Center
   /HOffset 0
   /VOffset 0

So what we need to do to add our new tag is to insert it into the right place in the document. Start by doing a search for the “RichMediaSettings” tag – this is the tag that we will be adding our new tag to.

You’ll notice that that RichMediaSettings starts with a dictionary object and that there are a series of nested commands/dictionary objects and is a bit hard to read.

Since newline characters and padding are ok, I’ll do some quick formatting to help us make sense of what we’re looking at – we are realy only concerned with finding the “height” and “width” of the Rich Media Annotation (the video in this case) because that marks where our new code will go.

You don’t have to format your code in this manner, but it does make things easier to see. What we want to do is to past our new “Position” tag after the “Width” tag.

Hilite the block of code that I mentioned above and paste it after the “Width” tag like so:

Thats it – do a search for more Rich Media items in your document, if there are any as you will need to repeat the above paste for each instance of RichMediaSettings.

Next, save the file, then open in Acrobat and try things out. The video/Rich Media Annotation should launch centered on the screen. The very last thing to do is to compress your PDF – to do so just save it as a new PDF and Acrobat will apply the default compression settings.

Note that if you edit the video within Acrobat Pro (i.e., right-click, properties then change a setting) that the code we pasted in will be removed and you will need to manually reinsert it.