[poppler] Getting the image rects from a page

Leonard Rosenthol leonardr at pdfsages.com
Mon Apr 17 09:36:44 PDT 2006


At 11:41 AM 4/17/2006, Albert Astals Cid wrote:
>In kpdf we have a code in our custom outputdev that gets the image 
>rectangle a
>image is using in the page, so when displaying it the user can right click on
>it and select "save image".

         Great!


>How do you prefer i add this feature?
>I have thought of changing PDFDoc::displayPage and friends to accept a
>doImageRects parameter and then having a thing like PDFDoc::takeRects(), that
>is, following the same structure one uses for getting the links.

         I wouldn't touch PDFDoc && displayPage - too low level and 
will make future updates harder.

         I would add it simply to your OutputDev and then expose it 
as a parameter there.  Also same with the list of rects, get it from the OD...


Leonard

---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:leonardr at pdfsages.com>
Chief Technical Officer                      <http://www.pdfsages.com>
PDF Sages, Inc.                              215-938-7080 (voice)
                                              215-938-0880 (fax)



More information about the poppler mailing list