[xep-support] CoolTools -- well, sort of -- cool stuff -- the *new* <rx:media-object>

From: Kevin Brown <kevin@renderx.com>
Date: Fri Dec 04 2009 - 10:25:47 PST

Today RenderX released version 4.17. Among the several enhancements is one
that has been asked for many times. XEP now supports embedding multi-media
into your PDF documents.

This includes:

..aiff audio/aiff Audio Interchange File Format
..au audio/basic NeXT/SunT Audio Format
..avi video/avi AVI (Audio/Video Interleaved)
..mid audio/midi MIDI (Musical Instrument Digital Interface)
..mov video/quicktime QuickTime
..mp3 audio/x-mp3 MPEG Audio Layer-3
..mp4 audio/mp4 MPEG-4 Audio
..mp4 video/mp4 MPEG-4 Video
..mpeg video/mpeg MPEG-2 Video
..smil application/smil Synchronized Multimedia Integration Language
..swf application/x-shockwave-flash Macromedia Flash

It is supported through an extension element <rx:media-object> that
(currently) is controlled by the DTD fragment below. I say currently as we
will enhance in future versions to provide additional features for some
advanced controls. We would welcome all of your feedback on additional
things you would like to see.

How do you do it? Easy ...

First, make sure your document includes the RenderX extensions namespace:

xmlns:rx="http://www.renderx.com/XSL/Extensions"

Next, make sure you set the PDF Version to at least 1.5. The default is 1.4
so you definitely need to make a change here. You can edit xep.xml and add
in the Formatter options section:

<option name="PDF_VERSION" value="1.5"/>

Or you can use a processing-instruction in your document immediately
preceding or following the root element like:

<?xep-pdf-pdf-version 1.5?>

Next, insert the movie. <rx:media-object> can be a child of <fo:inline> or
<fo:block>. The attributes "content-width", "content-height" and
"content-type" (and of course "src") are required. The mime types supported
for "content-type" are shown in the above table. So, a sample MPEG-2 movie
would be ...

<fo:block>
        <rx:media-object
                src="url('MPG\MOV02962.MPG')"
                embed="true"
                content-width="320px"
                content-height="240px"
                content-type="video/mpeg"
                show-controls="true"/>
</fo:block>

The following DTD defines the extension element and attributes.

<!ENTITY % basic-inlines
        "...
        rx:media-object">

<!ENTITY % media-properties
  " embed ( false | true ) #IMPLIED
  | alt CDATA #IMPLIED
  | extraction-policy ( tempaccess | tempnever | tempextract | tepmalways )
#IMPLIED
  | show-controls ( true|false ) #IMPLIED" >
        
<!ELEMENT rx:media-object EMPTY>

<!ATTLIST rx:media-object
  %media-properties;
  id CDATA #IMPLIED
  content-type CDATA #REQUIRED
  content-height ( absolute_size ) #REQUIRED
  content-width ( absolute_size ) #REQUIRED
  src CDATA #REQUIRED
  scaling ( uniform | non-uniform | inherit ) #IMPLIED
  scaling-method ( auto | integer-pixels
                  | resample-any-method | inherit ) #IMPLIED>
        
We'll post a few samples showing various types of multi-media in the coming
days. More information on this feature is available in the documentation for
your download of 4.17.

Happy PDFing!

Kevin Brown
RenderX

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Dec 4 10:42:51 2009

This archive was generated by hypermail 2.1.8 : Fri Dec 04 2009 - 10:43:00 PST