Quantcast

Video In PDF

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Video In PDF

Dominic Maricic
Hi Guys,

I've spent a few weeks on trying to insert video into a PDF and just can't get it to work as I expect it to. Following the book I use annotations and have tried many different file formats (mp4, wav, avi, etc). With mp4's and all formats except swf I get a PDF that when I click on the video to play in Adobe Reader X I get told there's no media player, I need a 3rd party plugin and get directed to Adobe.com where I get told there's no plugin. SWF's embed and play but the quality is low and the file size is huge. There's no player though with a start/pause, etc.

In Adobe Acrobat I can click Insert Video, select an MP4 and the video gets embedded with a nice video player and everything works perfectly and has a small file size. I tried creating my own buttons in iText, but had the same 3rd party plugin errors. Am I missing something? Shouldn't I bet able to embed mp4's directly into a PDF and have them just work? They are h.264 encoded so should work!

PdfFileSpecification fs = PdfFileSpecification.fileEmbedded(writer, targetPath.getText(), "Video", null, true);
annot = PdfAnnotation.createScreen(writer,rectangle,"HIP Video", fs, "video/mp4", false);
writer.addAnnotation(annot);


Any help, or pointing me to a working example would be great. The book has a swf example but the player is built into the swf file.
Loading...