Am 17.02.2008 um 19:15 schrieb Pierre Marchand: > Vous avez écrit : >>> BTW: I'm want to use that method for looking up the /Resources in >>> the >>> page tree. Maybe PdfPage::GetResources() should do that >>> automatically? Same with other inherited attributes? >> >> GetResources() obtains access to the resources object its self, >> allowing >> the user to manipulate it. It'd certainly be very useful to have a >> separate method to obtain a list of all required resource, both local >> and inherited, though. >> >> I'm not sure how podofoimpose handles this, and I have to head out >> now. >> I wouldn't be too surprised if it's relying on podofo's unused >> indirect >> object garbage collection. > > For what I’m concerned, I was rather curious to see how Andreas > would manage > to retrieve all resources! To be honest, the way I do this in > podofoimpose is > a bit rough, asking for Resources dictionary at each level and go > up with > "rparent = rparent->GetIndirectKey( "Parent" );". You can read this in > PdfObject* PdfTranslator::getInheritedResources(PdfPage* page).
I do the same. The way I understand it, if a PageNode and one of its ancestors both have a Resources dictionary, only that on the lower level counts; ie. the dictionaries are not merged in this case. > Another problem, at least I found it problematistic, was to have > all resources > in an unique object. I wrote > PdfTranslator::mergeResKey(PdfObject *base,PdfName key, PdfObject > *tomerge) > to adress this. I don't need that. Each included page becomes a separate XObject with its private Resources dictionary. > All in all, I would have like to find these methods into > PoDoFo itself because not being a developer, I’m pretty sure these > methods > are suboptimal and not enough tested, if at all. > Yes, I was a bit surprised when GetResources() returned Null when called on the page of a valid PDF file. /Andreas ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Podofo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/podofo-users
