showing PDF with videos and links

Go To StackoverFlow.com

1

There is an app on the app store that shows online magazines, and it has some animations, page format change on orientation change, and some videos in between the pages.

I`m having a hard time finding how to do it, so if you guys got any better idea, please let me know. Basically:

1- Is it possible to show videos inside/between pdf/pdf pages?
2- Is there any other file format that shows images in sequence like a pdf, BUT supports animations?
3- I know how to change the picture when the device changes orientation, but is it doable on a pdf? do i need 2 pdf files with different orientation?

In the long run, i`m trying to do an animated/dynamic/interactive magazine viewer. Thanks in advance.

2012-04-05 15:24
by Erakk
possible duplicate of http://stackoverflow.com/questions/2853881/suggestions-on-implementing-an-ipad-magazine-ap - rakeshNS 2012-04-05 15:31
these magazine are not PDF files .. its html4 or html5 files - Malek_Jundi 2012-04-05 15:31


1

I don't see why you would not be able to play video/multimedia files in PDF.

PDF already supports video/multimedia which can be embedded in the file (as annotations - see https://groups.google.com/d/topic/pdfnet-sdk/uUcA75j0IPg/discussion)

However based on your description it seems that you want to support streaming external content which is different from embedded multimedia annotations.

This is not directly supported by PDF spec, however nothing prevents you from customizing link annotation and extending your app to support this use case scenario.

For example if you create an annotation of type 'e_Link' and actions of Type 'e_URI', you could also add some custom entries in the annotation or action dictionary... For example:

pdftron.PDF.Action act = pdftron.PDF.Action.CreateURI(doc.GetSDFDoc());
pdftron.PDF.Annots.Link link = pdftron.PDF.Annots.Link.Create(doc.GetSDFDoc(), new Rect(85, 458, 503, 502), act);
pdftron.SDF.Obj dict = link.GetSDFObj();
dict.PutBool("My multimedia annot", true);
dict.PutName("MyString", "foo:bar, some parameter for streaming... if required etc");
...

When a user taps on a link annotation you can identify the annotation that is clicked (tapped) on. This is done in the tools library which is provided in the source code form with a license purchase or using pdfview.GetAnnotaAt(x,y). You can identify your multimedia annotation by querying for the custom tag:

Annot a = ...
pdftron.SDF.Obj my_tag = a.GetSDFObj().FindObj("My multimedia annot ");
if (my_tag != null && my_tag.GetBool())  {
 string my_params = a.GetSDFObj().FindObj("MyString").GetName();
  ... use custom parameters and URL from associated action to stream remote data.
}

For streaming & playing remote multimedia you would use platform APIs which are available on both Android and iOS.

For more info see: https://groups.google.com/d/topic/pdfnet-sdk/WgEWM9OSCi0/discussion

2012-04-05 18:36
by Ika
Thankyou very much! I'll see into it - Erakk 2012-04-09 12:32
Ads