Commit a7966705 authored by Dominique Devriese's avatar Dominique Devriese

make print preview work

svn path=/trunk/kdegraphics/kpdf/; revision=276172
parent ada86359
......@@ -659,7 +659,15 @@ void Part::printPreview()
{
KPrinter printer;
printer.setPreviewOnly( true );
doPrint( printer );
QPainter painter( &printer );
QOutputDevKPrinter printdev( painter, printer );
int max = m_doc->getNumPages();
for ( int i = 1; i <= max; ++i )
{
m_doc->displayPage( &printdev, i, printer.resolution(), 0, true );
if ( i != max )
printer.newPage();
}
}
void Part::doPrint( KPrinter& printer )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment