I've had look at the code (in poppler/ not glib/ i'll leave that to the
glib/ experts) and have some minor and some major comments.

Minor: 
 * There's 3 use of malloc i could find, for completion i guess it's better if 
you use gmalloc
 * SigStatusStruct should be a C++ class

Medium:
 * I'm not convinced getSigningTime should return a char *, i'd very much 
prefer it returning an integer and shifting the responsability to turn it into 
a string to upper layers, since allows for translations, etc.

Major:
 * There's lots of repeated code (the loops searching for "Annot"+"Sig" some of 
these with more checks for nulls than others) and some functions that make no 
sense in PDFDoc like Object *getByteRange(int index);

If you see in Form::Form we're already parsing "Fields" and creating
FormFieldSignature for each "Sig" object.

My suggestion is that you expand FormFieldSignature with your
implementation.

That also solves API issues like for for example getSignerName should
not be in PDFDoc since you need to have called validateSignature before
and then it returns the signer name for the signature of that index, so
it should be part of a signature object, i.e. FormFieldSignature.

Do you think it makes sense?

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to evince in Ubuntu.
https://bugs.launchpad.net/bugs/1085526

Title:
  ubuntu pdf doc viewer will not let me sign a document

To manage notifications about this bug go to:
https://bugs.launchpad.net/poppler/+bug/1085526/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to