[poppler] Form-Reset and Print [patches]

Guillermo Amaral gamaral at kdab.com
Sat Jun 26 02:02:25 PDT 2010


On Sat, Jun 26, 2010 at 10:08:55AM +0200, Carlos Garcia Campos wrote:
> Excerpts from Guillermo Amaral's message of sáb jun 26 06:23:59 +0200 2010:
> > 
> >   Ok guys,
> > 
> >   Let's see if I cought all the details ;-)
> > 
> >   Check it out
> > 
> > diff --git a/poppler/Link.cc b/poppler/Link.cc
> > index b6d7f2d..d2079ea 100644
> > --- a/poppler/Link.cc
> > +++ b/poppler/Link.cc
> >  //------------------------------------------------------------------------
> > +// LinkResetForm
> > +//------------------------------------------------------------------------
> > +
> > +LinkResetForm::LinkResetForm(Object *obj) {
> > +  Object obj1;
> > +
> > +  fieldList = new GooList();
> > +  flags = 0;
> > +
> > +  if (obj->dictLookup("Fields", &obj1)->isArray()) {
> > +    for (int i = 0; i < obj1.arrayGetLength(); ++i) {
> > +      Object obj2;
> > +
> > +      if (obj1.arrayGetNF(i, &obj2)->isString()) {
> > +        fieldList->append(obj2.getString()->copy());
> > +      } else {
> > +        obj2.free();
> > +
> > +        if (obj1.arrayGet(i, &obj2)->isDict()) {
> > +          Object obj3;
> > +
> > +          if (obj2.dictLookup("T", &obj3)->isString())
> > +            fieldList->append(obj3.getString()->copy());
> 
> This is not equivalent, in case of being a text string it represents
> the fully qualified name of a field, but T entry in the field
> dictionary is the partial filed Name, and it's optional, when it's not
> present we are loosing the field. The fully qualified name is not
> stored directly in the field dictionary, it should be built using
> partial names of fields in the hierarchy.

  I found only examples with partial names in the field list, so I used T. I
  had no success finding one that uses refs in the field list at all; 
  I had to make one manually.

> I think we could just store the objects without parsing them, and let
> the frontends handle it. 

  Fine by me, but it's up to you guys.

  Cheers,
  GA

-- 
Guillermo Amaral | guillermo.amaral at kdab.com | Software Desperado
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions




More information about the poppler mailing list