[poppler] Two patches related to glib interface API references and a question about embedded files

Pino Toscano pino at kde.org
Sat Jan 17 07:15:43 PST 2009


can't say anithing about the GLib frontend, but I can about your other 

> I also have a question: It seems to me that the poppler API uses three
> different ways to make embedded files accessible for different types:

Yep, there are different types of "embedded files".

> - PDFDoc.getCatalog().embeddedFile(i) returning EmbFile

Those embedded files are the global ones, ie attachments for the document.

> - AnnotFileAttachment::getFile
>   that stops short of returning EmbFile (qt bindings seem to access
>   things via EmbFile, thoug)

This represents the attached file of a AttachFile annotation (guess what it 
does :) ).
For accessing those, you should create an new EmbFile object as the Qt4 
frontend does, ie
   EmbFile *embfile = new EmbFile(aa->getFile(), aa->getContents());
(where 'aa' is your AnnotFileAttachment.)
Then the ownership is the EmbFile is callee's, just like it happens for the 
EmbFile's returned by Catalog.

> - Apparently Movie::outputToFile is different here.

This is not a "classic" embedded file, but an audio/video file to be played 
for a movie annotation (for example).

> Is it OK to model access to file attachment annotations after the the
> document-attachment (that wraps the access via
> PDFDoc.getCatalog().embeddedFile)?

Those are different, so I wouldn't say it is correct.

Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090117/e5f005fa/attachment.pgp 

More information about the poppler mailing list