Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

How to add Rich Media Annotations? 8 years 5 months ago #11435

  • rpc_1910
  • rpc_1910's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
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

Please Log in or Create an account to join the conversation.

How to add Rich Media Annotations? 8 years 5 months ago #11436

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
Hi,
here an example of how to use this method :
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.

Please Log in or Create an account to join the conversation.

How to add Rich Media Annotations? 8 years 5 months ago #11437

  • rpc_1910
  • rpc_1910's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

How to add Rich Media Annotations? 8 years 5 months ago #11438

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Thank you received: 65
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.
*/

The following user(s) said Thank You: rpc_1910

Please Log in or Create an account to join the conversation.

How to add Rich Media Annotations? 8 years 5 months ago #11439

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 695
  • Thank you received: 59
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.
The following user(s) said Thank You: rpc_1910

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum