Hi all,
I added new functionality for setting the action for screen
annotation. It requires to create LinkRendition which i submitted in
previous patches.
Please give your suggestions.
Thanks
--
A Srinivas
Index: poppler-0.16.2/poppler/Annot.h
===================================================================
--- poppler-0.16.2/poppler/Annot.h (revision 14)
+++ poppler-0.16.2/poppler/Annot.h (working copy)
@@ -739,6 +739,7 @@
AnnotAppearanceCharacs *getAppearCharacs() { return appearCharacs; }
LinkAction* getAction() { return action; }
+ GBool setAction(LinkAction *action);
Object* getAdditionActions() { return &additionAction; }
private:
Index: poppler-0.16.2/poppler/Annot.cc
===================================================================
--- poppler-0.16.2/poppler/Annot.cc (revision 14)
+++ poppler-0.16.2/poppler/Annot.cc (working copy)
@@ -4258,6 +4258,19 @@
}
+GBool AnnotScreen::setAction(LinkAction *action) {
+ Object obj;
+ Ref ref = action->getRef();
+
+ if (ref.num < 0 || ref.num > xref->getNumObjects()) {
+ error(-1, "Invalid reference to set the action");
+ return gFalse;
+ }
+
+ obj.initRef(ref.num, ref.gen);
+ update("A", &obj);
+}
+
//------------------------------------------------------------------------
// AnnotStamp
//------------------------------------------------------------------------
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler