LordQt
1st February 2008, 13:31
Hello friends,
simple question: How can I add a bookmark information to my pdf??
Here is my Code:
QPrinter printer;
QPainter p;
printer.setOrientation(QPrinter::Portrait);
printer.setOutputFileName("Sendungen.pdf");
printer.setOutputFormat(QPrinter::PdfFormat);
if (db.open()){
QSqlQuery query( "select Statement ");
query.setForwardOnly(true);
while(query.next()){
QSqlRecord record = query.record();
myimage.loadFromData(query.value(record.indexOf("imgData" ) ).toByteArray(),0);
myimage.convertToFormat(QImage::Format_Mono);
//p.setRenderHint(QPainter::Antialiasing, true);
p.begin(&printer);
p.drawImage(0, 0, myimage);
printer.newPage();
}
p.end();
}
There are many pictures in the pdf, and I search for a method to add a bookmark information per page. Is this possible??
simple question: How can I add a bookmark information to my pdf??
Here is my Code:
QPrinter printer;
QPainter p;
printer.setOrientation(QPrinter::Portrait);
printer.setOutputFileName("Sendungen.pdf");
printer.setOutputFormat(QPrinter::PdfFormat);
if (db.open()){
QSqlQuery query( "select Statement ");
query.setForwardOnly(true);
while(query.next()){
QSqlRecord record = query.record();
myimage.loadFromData(query.value(record.indexOf("imgData" ) ).toByteArray(),0);
myimage.convertToFormat(QImage::Format_Mono);
//p.setRenderHint(QPainter::Antialiasing, true);
p.begin(&printer);
p.drawImage(0, 0, myimage);
printer.newPage();
}
p.end();
}
There are many pictures in the pdf, and I search for a method to add a bookmark information per page. Is this possible??