*** khtml/khtmlview.cpp.old	2009-11-08 19:58:20.000000000 +0900
--- ./khtml/khtmlview.cpp	2009-11-08 22:01:10.000000000 +0900
***************
*** 3230,3236 ****
--- 3230,3238 ----
          // the whole thing.
          int pageWidth = printer.width();
          int pageHeight = printer.height();
+ #ifdef	ORIGIANL_CODE
          p->setClipRect(0,0, pageWidth, pageHeight);
+ #endif
  
          pageHeight -= headerHeight;
  
***************
*** 3247,3252 ****
--- 3249,3257 ----
  #endif
          kDebug(6000) << "printing: scaled html width = " << pageWidth
                        << " height = " << pageHeight << endl;
+ #ifndef	ORIGIANL_CODE
+         p->setClipRect(0,0, pageWidth, pageHeight + headerHeight);
+ #endif
  
          root->setHeight(pageHeight);
          root->setPageBottom(pageHeight);
***************
*** 3275,3280 ****
--- 3280,3291 ----
          int bottom = 0;
          int page = 1;
          while(top < root->docHeight()) {
+ #ifndef	ORIGINAL_CODE
+ #ifndef QT_NO_TRANSFORMATIONS
+             if (scalePage)
+                 p->scale(scale, scale);
+ #endif
+ #endif
              if(top > 0) printer.newPage();
              p->save();
              p->setClipRect(0, 0, pageWidth, headerHeight);
***************
*** 3291,3300 ****
--- 3302,3313 ----
                  p->drawText(0, 0, printer.width(), dy, Qt::AlignRight, headerRight);
              }
  
+ #ifdef	ORIGINAL_CODE
  #ifndef QT_NO_TRANSFORMATIONS
              if (scalePage)
                  p->scale(scale, scale);
  #endif
+ #endif
              p->restore();
              p->translate(0, headerHeight-top);
  
