[Okular-devel] Review Request 111410: Selection tool: copy/extract as vector graphic by calling "pdftocairo"

Albert Astals Cid aacid at kde.org
Sun Jan 12 21:49:07 UTC 2014



> On Oct. 14, 2013, 10:33 p.m., Albert Astals Cid wrote:
> > generators/poppler/generator_pdf.cpp, line 1538
> > <https://git.reviewboard.kde.org/r/111410/diff/8/?file=185148#file185148line1538>
> >
> >     This needs to be made async, this will potentiall freeze the UI for a while depending on what we ask pdftocairo to do. That obviously means you can't return a bool, but should probably return something like a KJob.
> >     
> >     Yes, i know the old export doesn't do that, but the fact that we did it wrong before is not an excuse for doing it wrong now :-)
> 
> Thomas Fischer wrote:
>     I will upload a new patch soon. It should address the three issues, except for that I have problems linking the code ("undefined reference to `vtable for PDFGenerator'"). Maybe you can see what the problem is ...

You usually get that where some .moc problem is happening. Make sure you have a clean build.


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/111410/#review41759
-----------------------------------------------------------


On Jan. 12, 2014, 9:46 p.m., Thomas Fischer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/111410/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2014, 9:46 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> This patch implements the feature request of bug 321350: if a PDF file is viewed, the selection tool offers the new extraction method "vector" which allows to save to a file (PDF, SVG, EPS, PostScript). The crop operation is performed by calling "pdftocairo" with matching arguments. The resulting file contains the original PDF file's content without rendering it to a pixmap.
> 
> I am not sure if calling an external program is an acceptable solution for this problem. However, it is tested if the program is available before showing the new option. Alternatively, the code of pdftocairo (as part of poppler) would had to be copied and integrated into Okular increasing the solution's complexity. I am not aware of a similar solution available using poppler-qt4 only. Maybe using a QPrinter printing to PDF would have been an alternative, but again this seemed to be too complex.
> 
> 
> Diffs
> -----
> 
>   core/document.h fe296e0 
>   core/document.cpp fa6345f 
>   core/generator.h 3cf40c2 
>   core/generator.cpp 41beb92 
>   generators/poppler/generator_pdf.h 5d5853a 
>   generators/poppler/generator_pdf.cpp 839a324 
>   ui/minibar.h 5654ad8 
>   ui/minibar.cpp 6a501b8 
>   ui/pageview.cpp 65967bf 
> 
> Diff: https://git.reviewboard.kde.org/r/111410/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Thomas Fischer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140112/43f1e982/attachment.html>


More information about the Okular-devel mailing list