[poppler] Patch for embedding videos in to the pdf.

srinivas adicherla srinivas.adicherla at gmail.com
Tue Feb 15 06:37:20 PST 2011


Hi all,

    I made a patch for embedding videos into the pdf file. I created a
Screen annotation, and add a Rendition action to it. For appearance I took
the image from the user (only accepting png), later I will do for others
also. I tested opening the embedded pdf files using Adobe and Foxit Reader
it was successfully opened for me. I tried for swf and mpg files.
I am asking the user to specify the image because there are lot of video
formats, so its time consuming for creating an image from the video frame
for all types. ( May be in the future i add that or anybody can help me in
that).

I added the same in bugzilla.

Please give me suggestions to make this successful.

Thanks in Advance.
A Srinivas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110215/fc85f90a/attachment.html>
-------------- next part --------------

PopplerDocument *document;
PopplerPage *page;
// pass the fileuri to create a document
document = poppler_document_new_from_file (fileuri, NULL, NULL);
page = poppler_document_get_page (document, page_number);
// pass video file uri and its mimetype and pass some png image for appearance
PopplerAnnot *annot = poppler_annot_screen_new (document, area, video_file_uri, mimetype, "pngimage.png");
poppler_page_add_annot (page, annot);
//save it into the new file
poppler_document_save (document, newfileuri, NULL);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: srinivas_video_embedd.patch
Type: text/x-patch
Size: 11789 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110215/fc85f90a/attachment.bin>


More information about the poppler mailing list