Description of problem: Okular renders hyperlinks as green boxes when printing. See this kde bug: https://bugs.kde.org/show_bug.cgi?id=180980 This is fixed in poppler 0.10. Can it be upgraded please? Version-Release number of selected component (if applicable): poppler-qt4-0.8.7-1.fc10.x86_64 How reproducible: Every time Steps to Reproduce: 1. Open http://arxiv.org/pdf/0811.0743v1 in okular 2. Print file Actual results: Green boxes printed around references. Expected results: No green boxes in printout. Additional info:
The new poppler-0.10 introduces an abi break, which would require a rebuild of all poppler-consuming applications. I hope you can understand reservations about doing that in the middle of a release cycle.
Hmmm - looking at the sourcecode and comparing the old 0.8.7 to the new 0.10, I've identified a fix. I've patched qt4/src/poppler-ps-converter.cc to always tell poppler that the output is being printed (not shown on screen) and so not to render hyperlinks. It seems to work for me. This fix only affects qt4 applications (only poppler as far as I know), and only the postscript generation. People only want to print postscript, so this fix is safe and correct as far as I can see.
Created attachment 329236 [details] Patch to always tell poppler that the output is being printed if postscript is generated by the qt4 interface
Is that how the 0.10 branch/fix handles this case too?
More or less. 0.7.8 has this loop to print the pages: 193 foreach(int page, d->pageList) 194 { 195 d->document->doc->displayPage(psOut, page, d->hDPI, d->vDPI, d->rotate, gFalse, gTrue, gFalse); 196 } Whereas, 0.10 branch has: 211 GBool isPrinting = (d->opts & Printing) ? gTrue : gFalse; 212 foreach(int page, d->pageList) 213 { 214 d->document->doc->displayPage(psOut, page, d->hDPI, d->vDPI, d->rotate, gFalse, gTrue, isPrinting); 215 } d->opts is initialised to Printing by default: 53 PSConverterPrivate::PSConverterPrivate() 54 : BaseConverterPrivate(), 55 hDPI(72), vDPI(72), rotate(0), paperWidth(-1), paperHeight(-1), 56 marginRight(0), marginBottom(0), marginLeft(0), marginTop(0), 57 opts(PSConverter::Printing) 58 { 59 } So 0.10 has changed the default to isPrinting, but also added an interface to be able to change this default: 157 void PSConverter::setPSOptions(PSConverter::PSOptions options) 158 { 159 Q_D(PSConverter); 160 d->opts = options; 161 } The default of True for isPrinting makes much more sense for postscript output, which is almost always printed or displayed on the screen as would a printout. My patch modifies the output by making postscript output always behave as if it were sent to a printer, leaving out the hyperlink rectangles.
thanks.
I'll have to think about it a bit, this would regress screen rendering of postscript files with embedded hyperlinks, no?
I don't think so. As far as I can tell, Poppler only renders PDF, not postscript. For instance, okular uses libgs to render Postscript, see http://okular.kde.org/download.php . Postscript doesn't support the hyperlinks either - at least evince and gv don't see them. The only way I could think of it having an effect would be if there were a qt4 based application which used Poppler to render a PDF to Postscript, then sent the Postscript to something like ghostscript to render to the screen. Anyway, I can work around this personally with my patch, and check nothing obvious breaks. I suppose it depends on how many people are going to get hit by this issue, and the risk of regressing something. I don't see any obvious risks as there aren't that many qt4-poppler based renderers out there (at least yet).
alright, I'll work on integrating the patch.
poppler-0.8.7-5.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/poppler-0.8.7-5.fc10
poppler-0.8.7-5.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update poppler'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0937
poppler-0.8.7-5.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.