diff -r e7b5aca023c2 -r 9ac1c40f2bff poppler/PageTransition.cc --- a/poppler/PageTransition.cc Fri Sep 18 14:06:22 2015 +0200 +++ b/poppler/PageTransition.cc Fri Sep 18 14:08:53 2015 +0200 @@ -80,8 +80,8 @@ obj.free(); // get duration - if (dict->lookup("D", &obj)->isInt()) { - duration = obj.getInt(); + if (dict->lookup("D", &obj)->isNum()) { + duration = obj.getNum(); } obj.free(); diff -r e7b5aca023c2 -r 9ac1c40f2bff poppler/PageTransition.h --- a/poppler/PageTransition.h Fri Sep 18 14:06:22 2015 +0200 +++ b/poppler/PageTransition.h Fri Sep 18 14:08:53 2015 +0200 @@ -24,6 +24,7 @@ #endif #include "Object.h" +#include //------------------------------------------------------------------------ // PageTransition @@ -71,8 +72,11 @@ // Get type PageTransitionType getType() { return type; } + // Get duration as integer (for backwards compatibility only) + int getDuration() { return ceil(duration);} + // Get duration - int getDuration() { return duration;} + double getDurationReal() {return duration;} // Get alignment PageTransitionAlignment getAlignment() { return alignment; } @@ -92,7 +96,7 @@ private: PageTransitionType type; // transition style - int duration; // duration of the effect in seconds + float duration; // duration of the effect in seconds PageTransitionAlignment alignment; // dimension of the effect PageTransitionDirection direction; // direction of motion int angle; // direction in degrees diff -r e7b5aca023c2 -r 9ac1c40f2bff qt4/src/poppler-page-transition.cc --- a/qt4/src/poppler-page-transition.cc Fri Sep 18 14:06:22 2015 +0200 +++ b/qt4/src/poppler-page-transition.cc Fri Sep 18 14:08:53 2015 +0200 @@ -68,6 +68,11 @@ return data->pt->getDuration(); } +double PageTransition::durationReal() const +{ + return data->pt->getDurationReal(); +} + PageTransition::Alignment PageTransition::alignment() const { return (Poppler::PageTransition::Alignment)data->pt->getAlignment(); diff -r e7b5aca023c2 -r 9ac1c40f2bff qt4/src/poppler-page-transition.h --- a/qt4/src/poppler-page-transition.h Fri Sep 18 14:06:22 2015 +0200 +++ b/qt4/src/poppler-page-transition.h Fri Sep 18 14:08:53 2015 +0200 @@ -109,11 +109,16 @@ Type type() const; /** - \brief Get duration of the transition in seconds. + \brief Get duration of the transition in seconds as integer (for backwards compatibility) */ int duration() const; /** + \brief Get duration of the transition in seconds + */ + double durationReal() const; + + /** \brief Get dimension in which the transition effect occurs. */ Alignment alignment() const; diff -r e7b5aca023c2 -r 9ac1c40f2bff qt5/src/poppler-page-transition.cc --- a/qt5/src/poppler-page-transition.cc Fri Sep 18 14:06:22 2015 +0200 +++ b/qt5/src/poppler-page-transition.cc Fri Sep 18 14:08:53 2015 +0200 @@ -68,6 +68,11 @@ return data->pt->getDuration(); } +double PageTransition::durationReal() const +{ + return data->pt->getDurationReal(); +} + PageTransition::Alignment PageTransition::alignment() const { return (Poppler::PageTransition::Alignment)data->pt->getAlignment(); diff -r e7b5aca023c2 -r 9ac1c40f2bff qt5/src/poppler-page-transition.h --- a/qt5/src/poppler-page-transition.h Fri Sep 18 14:06:22 2015 +0200 +++ b/qt5/src/poppler-page-transition.h Fri Sep 18 14:08:53 2015 +0200 @@ -109,11 +109,16 @@ Type type() const; /** - \brief Get duration of the transition in seconds. + \brief Get duration of the transition in seconds as integer (for backwards compatibility). */ int duration() const; /** + \brief Get duration of the transition in seconds + */ + double durationReal() const; + + /** \brief Get dimension in which the transition effect occurs. */ Alignment alignment() const;