| Poppler Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
Synopsis
#include <poppler.h> union PopplerAction; PopplerDest; PopplerActionAny; PopplerActionGotoDest; PopplerActionGotoRemote; PopplerActionLaunch; PopplerActionUri; PopplerActionNamed; PopplerActionMovie; PopplerActionRendition; PopplerActionOCGState; enum PopplerActionType; enum PopplerDestType; enum PopplerActionMovieOperation; PopplerActionLayer; enum PopplerActionLayerAction; PopplerAction * poppler_action_copy (PopplerAction *action); void poppler_action_free (PopplerAction *action); PopplerDest * poppler_dest_copy (PopplerDest *dest); void poppler_dest_free (PopplerDest *dest);
Details
PopplerDest
typedef struct {
PopplerDestType type;
int page_num;
double left;
double bottom;
double right;
double top;
double zoom;
gchar *named_dest;
guint change_left : 1;
guint change_top : 1;
guint change_zoom : 1;
} PopplerDest;
Data structure for holding a destination
PopplerDestType |
type of destination |
| page number | |
| left coordinate | |
| bottom coordinate | |
| right coordinate | |
| top coordinate | |
| scale factor | |
| name of the destination (POPPLER_DEST_NAMED only) | |
| whether left coordinate should be changed | |
| whether top coordinate should be changed | |
| whether scale factor should be changed |
PopplerActionGotoDest
typedef struct {
PopplerActionType type;
gchar *title;
PopplerDest *dest;
} PopplerActionGotoDest;
PopplerActionGotoRemote
typedef struct {
PopplerActionType type;
gchar *title;
gchar *file_name;
PopplerDest *dest;
} PopplerActionGotoRemote;
PopplerActionLaunch
typedef struct {
PopplerActionType type;
gchar *title;
gchar *file_name;
gchar *params;
} PopplerActionLaunch;
PopplerActionUri
typedef struct {
PopplerActionType type;
gchar *title;
char *uri;
} PopplerActionUri;
PopplerActionNamed
typedef struct {
PopplerActionType type;
gchar *title;
gchar *named_dest;
} PopplerActionNamed;
PopplerActionMovie
typedef struct {
PopplerActionType type;
gchar *title;
PopplerActionMovieOperation operation;
PopplerMovie *movie;
} PopplerActionMovie;
PopplerActionRendition
typedef struct {
PopplerActionType type;
gchar *title;
gint op;
PopplerMedia *media;
} PopplerActionRendition;
PopplerActionOCGState
typedef struct {
PopplerActionType type;
gchar *title;
GList *state_list;
} PopplerActionOCGState;
enum PopplerActionType
typedef enum
{
POPPLER_ACTION_UNKNOWN, /* unknown action */
POPPLER_ACTION_NONE, /* no action specified */
POPPLER_ACTION_GOTO_DEST, /* go to destination */
POPPLER_ACTION_GOTO_REMOTE, /* go to destination in new file */
POPPLER_ACTION_LAUNCH, /* launch app (or open document) */
POPPLER_ACTION_URI, /* URI */
POPPLER_ACTION_NAMED, /* named action*/
POPPLER_ACTION_MOVIE, /* movie action */
POPPLER_ACTION_RENDITION, /* rendition action */
POPPLER_ACTION_OCG_STATE /* Set-OCG-State action */
} PopplerActionType;
Action types
| unknown action | |
| no action specified | |
| go to destination | |
| go to destination in another document | |
| launch app (or open document | |
| URI | |
| predefined action | |
| play movies. Since 0.14 | |
| play multimedia content. Since 0.14 | |
| state of layer. Since 0.14 |
enum PopplerDestType
typedef enum
{
POPPLER_DEST_UNKNOWN,
POPPLER_DEST_XYZ,
POPPLER_DEST_FIT,
POPPLER_DEST_FITH,
POPPLER_DEST_FITV,
POPPLER_DEST_FITR,
POPPLER_DEST_FITB,
POPPLER_DEST_FITBH,
POPPLER_DEST_FITBV,
POPPLER_DEST_NAMED
} PopplerDestType;
Destination types
| unknown destination | |
| go to page with coordinates (left, top) positioned at the upper-left corner of the window and the contents of the page magnified by the factor zoom | |
| go to page with its contents magnified just enough to fit the entire page within the window both horizontally and vertically | |
| go to page with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window | |
| go to page with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window | |
| go to page with its contents magnified just enough to fit the rectangle specified by the coordinates left, bottom, right, and top entirely within the window both horizontally and vertically | |
| go to page with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically | |
| go to page with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of its bounding box within the window | |
| go to page with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of its bounding box within the window | |
got to page specified by a name. See poppler_document_find_dest()
|
enum PopplerActionMovieOperation
typedef enum
{
POPPLER_ACTION_MOVIE_PLAY,
POPPLER_ACTION_MOVIE_PAUSE,
POPPLER_ACTION_MOVIE_RESUME,
POPPLER_ACTION_MOVIE_STOP
} PopplerActionMovieOperation;
Movie operations
| play movie | |
| pause playing movie | |
| resume paused movie | |
| stop playing movie |
Since 0.14
PopplerActionLayer
typedef struct {
PopplerActionLayerAction action;
GList *layers;
} PopplerActionLayer;
Action to perform over a list of layers
PopplerActionLayerAction |
a PopplerActionLayerAction |
| list of PopplerLayers |
enum PopplerActionLayerAction
typedef enum
{
POPPLER_ACTION_LAYER_ON,
POPPLER_ACTION_LAYER_OFF,
POPPLER_ACTION_LAYER_TOGGLE
} PopplerActionLayerAction;
Layer actions
| set layer visibility on | |
| set layer visibility off | |
| reverse the layer visibility state |
Since 0.14
poppler_action_copy ()
PopplerAction * poppler_action_copy (PopplerAction *action);
Copies action, creating an identical PopplerAction.
|
a PopplerAction |
Returns : |
a new action identical to action
|
poppler_action_free ()
void poppler_action_free (PopplerAction *action);
Frees action
|
a PopplerAction |
poppler_dest_copy ()
PopplerDest * poppler_dest_copy (PopplerDest *dest);
Copies dest, creating an identical PopplerDest.
|
a PopplerDest |
Returns : |
a new destination identical to dest
|
