call endPage of GFXOutputDev *before* flushing all text/polygon output
[swftools.git] / lib / pdf / BitmapOutputDev.cc
index 53d23d1..cedf06a 100644 (file)
@@ -552,6 +552,7 @@ void BitmapOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, do
 void BitmapOutputDev::endPage()
 {
     msg("<verbose> endPage (BitmapOutputDev)");
+    gfxdev->endPage();
    
     if(layerstate == STATE_BITMAP_IS_ABOVE) {
        this->flushText();
@@ -568,7 +569,9 @@ void BitmapOutputDev::endPage()
     rgbdev->endPage();
     clip0dev->endPage();
     clip1dev->endPage();
-    gfxdev->endPage();
+
+    /* notice: we're not fully done yet with this page- there might still be 
+       a few calls to drawLink() yet to come */
 }
 
 GBool BitmapOutputDev::upsideDown()