From 4126f6f9c3d4a3214249326a08662942a3b2615b Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Mon, 14 May 2012 13:24:07 -0700 Subject: properly close links when going from page to page --- lib/pdf/CharOutputDev.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/pdf/CharOutputDev.cc b/lib/pdf/CharOutputDev.cc index e1d19b22..cd7ceffd 100644 --- a/lib/pdf/CharOutputDev.cc +++ b/lib/pdf/CharOutputDev.cc @@ -675,7 +675,13 @@ GBool CharOutputDev::needNonText() void CharOutputDev::endPage() { msg(" endPage (GfxOutputDev)"); - + + if(this->previous_link) { + if(device->setparameter) { + device->setparameter(device, "link", ""); + } + } + if(this->links) { kdtree_destroy(this->links); this->links = 0; @@ -688,6 +694,7 @@ void CharOutputDev::endPage() l = last; } this->last_link = 0; + this->previous_link = 0; } static inline double sqr(double x) {return x*x;} -- cgit v1.2.3