Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

How to add Rich Media Annotations?

More
9 years 4 months ago #11435 by rpc_1910
Hello
I'm developing an App and I'm having trouble adding audio and video annotations.
I saw that this is possible with the AddAnnotRichMedia method, but I was not able to understand the required parameters, such as the path_player parameter.
Can you explain me better?
Thank you
More
9 years 4 months ago #11436 by Davide
Hi,
here an example of how to use this method :
Code:
boolean result = page.AddAnnotRichMedia("/sdcard/VideoPlayer.swf", "/sdcard/video.mp4", 0, m_doc.NewImage(BitmapFactory.decodeResource( getResources(), R.drawable.pdf_custom_stamp), true), new float[]{pos.x, pos.y, pos.x + 200, pos.y + 200});

The first parameter is the swf player used to reproduce the media.
More
9 years 4 months ago #11437 by rpc_1910
Thanks for the feedback.
But where do I get the player to add to the app?
From what I understand, this is a file that will be stored on my device, right?
More
9 years 4 months ago #11438 by Davide
Hi,
the swf is a (flash player) file used to play the media you added with all the pdf readers, you can use a free player or create a custom one by yourself and put it into your project then copy to the device to be able to pass it to the create annotation method. Then when passed to the AddAnnotRichMedia it will be embedded into the pdf along with the video itself.

We are still checking if adobe player (VideoPlayer.swf, AudioPlayer.swf) are releasable freely or not.

Here some info about all the params :

/**
* add a RichMedia annotation to page.<br/>
* you should re-render page to display modified data.<br/>
* this can be invoked after ObjsStart or Render or RenderToBmp.<br/>
* this method require professional or premium license, and Document.SetCache invoked.
* @param path_player path-name to flash player. example: "/sdcard/VideoPlayer.swf", "/sdcard/AudioPlayer.swf"
* @param path_content path-name to RichMedia content. example: "/sdcard/video.mp4", "/sdcard/audio.mp3"
* @param type 0: Video, 1: Audio, 2: Flash, 3: 3D<br/>
* Video like *.mpg, *.mp4 ...<br/>
* Audio like *.mp3 ...<br/>
* @param image DocImage object return from Document.NewImage*();
* @param rect 4 elements: left, top, right, bottom in PDF coordinate system.
* @return true or false.
*/

More
9 years 4 months ago #11439 by support
To better clarify: the flash player is needed when opening rich media with Acrobat on windows/Mac.
It's a specific feature from Adobe.
That's the way Adobe decided to make PDF more flexible and capable to handle different file format.
Time to create page: 0.425 seconds
Powered by Kunena Forum