Version: (using KDE 4.0.1) Installed from: Ubuntu Packages Add an option to print a document with annotations included
I agree, I just tried to print an annotated document just to discover that the annotations are ignored when printing. At least a warning would be useful.
the same for me, annotations can't be print nor saved !
I wish u could do that, it might be very useful in reviewing or studying a document
*** This bug has been confirmed by popular vote. ***
*** Bug 213209 has been marked as a duplicate of this bug. ***
I hate to be rude, but reviews tools are useless crap now. It's impossible to use them to reviews papers, diplomas and other documents because there's no way to transfer them to another machine. Printing them to pdf file (via Print menu) could fix this.
There is a way to move them to other systems. File -> Export As -> Document Archive. I hate to be rude but the next time you are going to comment please read the manual before doing useless crap complaining.
Nonetheless, having the possibility to generate a new pdf, with the pdf printer, which includes the annotations would be nice. For example to share this annotations with the poor souls who still use Acrobat Reader under Windows... Because, unless I'm mistaken, the export command generate a file that other readers can't read.
Nicolas: please don't mix bugs. Read (all of) http://bugs.kde.org/show_bug.cgi?id=151614.
Well Brad, to me the two bugs are of course not the same but are strongly related. Because the possibility to print a pdf with its annotation could provide (if you choose a pdf printer) at least a part of the solution to the bug you mentionned. It's just another reason why to be able to print a document with its annotations would be nice. And if you can (one day hopefully) print a document with its annotation, I don't see the difficulty to use a pdf printer instead of a real printer.
*** Bug 226059 has been marked as a duplicate of this bug. ***
*** Bug 283666 has been marked as a duplicate of this bug. ***
For a quick and (very) dirty fix, try changing Document::print in Okular as shown below, and add "CMakeFiles/okularpart.dir/ui/pagepainter.o CMakeFiles/okularpart.dir/ui/guiutils.o" and "-lqimageblitz" to the Link command for libokularcore.so.1. From the command line, see LD_LIBRARY_PATH to include the directory with the new libokularcore.so.1 before /lib and /usr/lib, and run okular. This is a very quick and dirty fix - I have deliberately not performed some checks that should be performed, but it is enough to generate (via print to PDF) PDFs that show the annotations. It will sometimes SEGV after the printing is done, and there are no guarantees that it will not do so before that. bool Document::print( QPrinter &printer ) { int pages = d->m_pagesVector.count(); int page; QPainter painter(&printer); for (page = 0; page < pages; ++page) { QRect geom(printer.pageRect()); Page* pageptr = d->m_pagesVector.value( page, 0 ); QMap< int, PagePrivate::PixmapObject >::ConstIterator itEnd = pageptr->d->m_pixmaps.constEnd(); PixmapRequest *request = new PixmapRequest( itEnd.key(), page, geom.width(), geom.height(), 1, false ); request->d->mPage = pageptr; d->m_generator->generatePixmap(request); PagePainter::paintPageOnPainter(&painter, d->m_pagesVector[page], PRESENTATION_ID, PagePainter::Annotations, geom.width(), geom.height(), geom); if (page < pages) printer.newPage(); } return true; // return d->m_generator ? d->m_generator->print( printer ) : false; }
Starting from KDE 4.9, it's possible to print annotations in a PDF document (except for Stamp annotations, because printing support for this annotation type is not implemented yet). Since this bug is not only about PDFs, I'm leaving it open.
Is there a reason why printing stamp annotations isn't implemented yet ? This would make okular much more useful. Kind regards
As of https://bugs.kde.org/show_bug.cgi?id=151614, PDFs with annotations will now print as expected, for the most part. However there is a bug that affects the implementation, such that stamp annotations don't appear when the document is printed. That is tracked with https://bugs.kde.org/show_bug.cgi?id=383651