<br>Hi Albert<br> <br> Thank you for your suggestions. Sorry it was long gap since you gave those suggestions. I was so busy after that.<br><br>- about "#include <png.h>". I don't know how to check for those in configure/cmake files.<br>
If any one can give me any ideas how to do, it will be really helpful. I just check for #ENABLE_PNG and including it. I don't know whether it is right or not.<br><br>- Other things I used valgrind for memory leaks. Still in some places like "object.initDict(xref)" it is showing definitely leak some bytes.<br>
How to overcome those things. Not only in my code still in poppler some places it is showing leaking memory for initDict(xref) or initArray(xref).<br> But we cannot free those objects explicitly in our code, if we do like that. If we delete like that that value for that dictionary key it is not setting.<br>
<br>So is it fine?<br><br>Please kindly give suggestios.<br><br>Thank you all in advance.<br><br>--<br>A Srinivas<br><br><br><br><br><br><br> <br><br><br><div class="gmail_quote">On Wed, Feb 16, 2011 at 1:30 AM, <span dir="ltr"><<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Send poppler mailing list submissions to<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:poppler-owner@lists.freedesktop.org">poppler-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of poppler digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Patch for embedding videos in to the pdf. (Albert Astals Cid)<br>
2. Re: pdf import in Inkscap using poppler_glib and<br>
poppler_cairo (Albert Astals Cid)<br>
3. Re: Patch for embedding videos in to the pdf. (Albert Astals Cid)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 15 Feb 2011 19:13:09 +0000<br>
From: Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>><br>
Subject: Re: [poppler] Patch for embedding videos in to the pdf.<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: <<a href="mailto:201102151913.10014.aacid@kde.org">201102151913.10014.aacid@kde.org</a>><br>
Content-Type: Text/Plain; charset="us-ascii"<br>
<br>
A Dimarts, 15 de febrer de 2011, srinivas adicherla va escriure:<br>
> Hi all,<br>
<br>
Hi<br>
<br>
><br>
> I made a patch for embedding videos into the pdf file. I created a<br>
> Screen annotation, and add a Rendition action to it. For appearance I took<br>
> the image from the user (only accepting png), later I will do for others<br>
> also. I tested opening the embedded pdf files using Adobe and Foxit Reader<br>
> it was successfully opened for me. I tried for swf and mpg files.<br>
> I am asking the user to specify the image because there are lot of video<br>
> formats, so its time consuming for creating an image from the video frame<br>
> for all types. ( May be in the future i add that or anybody can help me in<br>
> that).<br>
><br>
> I added the same in bugzilla.<br>
<br>
Bad idea, don't do this. Either do it here or in the bugzilla but not in both.<br>
In two places just makes more difficult to follow the dicussion.<br>
<br>
Albert<br>
<br>
><br>
> Please give me suggestions to make this successful.<br>
><br>
> Thanks in Advance.<br>
> A Srinivas<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 15 Feb 2011 19:23:42 +0000<br>
From: Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>><br>
Subject: Re: [poppler] pdf import in Inkscap using poppler_glib and<br>
poppler_cairo<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: <<a href="mailto:201102151923.43633.aacid@kde.org">201102151923.43633.aacid@kde.org</a>><br>
Content-Type: Text/Plain; charset="iso-8859-1"<br>
<br>
A Dimarts, 15 de febrer de 2011, Pino Toscano va escriure:<br>
> Hi,<br>
><br>
> Alle marted? 15 febbraio 2011, the Adib ha scritto:<br>
> > currently Inkscape uses poppler internal API to read in pdf files.<br>
> > Those API breaks/changes from time to time.<br>
> ><br>
> > Now I try importing pdf via poppler cairo surface and those cairo<br>
> > surface as svg backend. So far that works.<br>
> ><br>
> > But I do not have any control over the process:<br>
> > - I can not set bitmap dpi<br>
> > - I can not specify if text stays text or convert to path<br>
> > etc.<br>
> ><br>
> > Do you have any sugestions?<br>
><br>
> What I proposed more than one year ago:<br>
> <a href="http://sourceforge.net/mailarchive/message.php?msg_id=24162410" target="_blank">http://sourceforge.net/mailarchive/message.php?msg_id=24162410</a><br>
<br>
That'd work me too :D<br>
<br>
Also if your custom inkscape converter does not depend in inkscape i see no<br>
reason why we could not have it inside poppler too if you commit to<br>
maintaining it here (this way you'd be much safer to API changes)<br>
<br>
Albert<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 15 Feb 2011 19:50:51 +0000<br>
From: Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>><br>
Subject: Re: [poppler] Patch for embedding videos in to the pdf.<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: <<a href="mailto:201102151950.51464.aacid@kde.org">201102151950.51464.aacid@kde.org</a>><br>
Content-Type: Text/Plain; charset="us-ascii"<br>
<br>
A Dimarts, 15 de febrer de 2011, srinivas adicherla va escriure:<br>
> Hi all,<br>
><br>
> I made a patch for embedding videos into the pdf file. I created a<br>
> Screen annotation, and add a Rendition action to it. For appearance I took<br>
> the image from the user (only accepting png), later I will do for others<br>
> also. I tested opening the embedded pdf files using Adobe and Foxit Reader<br>
> it was successfully opened for me. I tried for swf and mpg files.<br>
> I am asking the user to specify the image because there are lot of video<br>
> formats, so its time consuming for creating an image from the video frame<br>
> for all types. ( May be in the future i add that or anybody can help me in<br>
> that).<br>
><br>
> I added the same in bugzilla.<br>
><br>
> Please give me suggestions to make this successful.<br>
<br>
Some quick things:<br>
* You use png.h unconditionally that is not going to work, you need to use<br>
the proper defines to see if configure/cmake found it.<br>
* FILE *f;; <- extra ;<br>
* png_structp read_png;; <- again<br>
* error(-1, "The file could not be recognized as a PNG file."); <-- You don't<br>
close f here<br>
* You don't delete imgbuf<br>
* Wihtout having any idea png_create_info_struct seems like you should call<br>
destroy afterwards in the structure it returns<br>
* After<br>
MemStream *imgStream = load_from_png (img_file, &imgXObj, xrefA);<br>
if (!imgStream)<br>
return gFalse;<br>
you need to free all the Obj you've allocated<br>
* I'm pretty sure<br>
annotObj.dictSet("T", obj.initString(new GooString(video_name)));<br>
annotObj.dictSet("Contents", obj.initString(new GooString(video_name)));<br>
annotObj.dictSet("F", obj.initInt(4));<br>
is leaking memory as Object is not supposed to be reused without freeing it<br>
first, please use valgrind to detect leaks in your code<br>
<br>
Albert<br>
<br>
><br>
> Thanks in Advance.<br>
> A Srinivas<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br>
<br>
End of poppler Digest, Vol 72, Issue 21<br>
***************************************<br>
</blockquote></div><br>