support for accessing Action fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Poppler Python Bindings |
Fix Released
|
Undecided
|
Daniel | ||
python-poppler (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently python poppler does not support accessing the fields of the various poppler action structs. Poppler uses action structs for various things such as links to external files, links within the PDF, launching external applications, etc.
The attached patch adds several member functions to the Action class to allow accessing the struct fields. Note that poppler uses a different struct for each action type, while the python poppler bindings only use one Action class. If a member function to obtain a field that does not exist in the corresponding struct is called, a None object is returned.
The additional member functions are the following:
Action.
Action.get_title(): returns the title of the action (string or None)
Action.get_uri(): returns the URI (string or None)
Action.get_dest(): returns the destination (object of type Dest or None)
Action.
Action.
Action.
Best,
Martin
Changed in poppler-python: | |
status: | Fix Committed → Fix Released |
Hi Martin, sorry for the huge delay.
Being the Action an union makes things a lot more complicated of course, what about we create different objects (inheriting from gpointer) and we return the right one instead?
Does it make any sense to you or it will just complicate things more than necessary? Beware that I didn't look carefully at poppler code so it can be a nonsense what I just wrote.