<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>I just wanted to give you an update on my pdfium_generator implementation.<br/>
At this point it is usable for viewing and browsing a pdf:</div>

<div>What works: TOC, mark and copy text, follow internal/external links, printing</div>

<div><br/>
BUT the pdfium API still has a lot of things missing:</div>

<div> </div>

<div>- No public API to access embedded files:<br/>
https://bugs.chromium.org/p/pdfium/issues/detail?id=174</div>

<div> </div>

<div>- No public API to access font Informations:<br/>
https://bugs.chromium.org/p/pdfium/issues/detail?id=668</div>

<div> </div>

<div>- Hard to ship for distributions:<br/>
https://bugs.chromium.org/p/pdfium/issues/detail?id=451<br/>
pdfium is currently a mixture of static and shared libs.</div>

<div> </div>

<div>- Doesn't support Movie Annotations:<br/>
https://bugs.chromium.org/p/pdfium/issues/detail?id=577</div>

<div> </div>

<div>- No public API to access Annotations:<br/>
https://bugs.chromium.org/p/pdfium/issues/detail?id=671<br/>
pdfium can render Annotations, but this is not compatible how Okular does things.<br/>
You don't have any control over it, pdfium just returns the render buffer filled with Annotation content.</div>

<div> </div>

<div>- The same goes for Forms! Although it may be possible to write a wrapper API for Forms, but this will take A LOT of work.</div>

<div> </div>

<div>- Doesn't support printing as postscript.</div>

<div> </div>

<div>On the upside: It has Javascript support and sometimes renders things "better" than poppler. But I don't think switching to pdfium is a good idea for Okular in the near future.</div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Samstag, 21. Januar 2017 um 15:44 Uhr<br/>
<b>Von:</b> "Gilbert Assaf" <GAssaf@gmx.de><br/>
<b>An:</b> okular-devel@kde.org<br/>
<b>Betreff:</b> Re: PDFium plugin</div>

<div name="quoted-content">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>I decided to create an pdfium_generator branch, as Albert suggested. I guess the main focus from the pdfium guys is chromium support. But they have at least some pending issues in their bug tracker, which might change things in the future.  And it will take some time anyway to have a fully working pdfium plugin...
<div> 
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Mittwoch, 18. Januar 2017 um 08:02 Uhr<br/>
<b>Von:</b> "Jonathan Schultz" <jonathan@imatix.com><br/>
<b>An:</b> "Okular development" <okular-devel@kde.org>, "Gilbert Assaf" <GAssaf@gmx.de><br/>
<b>Betreff:</b> Re: PDFium plugin</div>

<div>Please excuse the silly comment about providing an executable - I see<br/>
that you said that we'd have to build it ourselves.<br/>
<br/>
So I just tried building, got most of the way without a hitch. I had to<br/>
also use ninja build libfx_lpng.a and libfx_freetype.a to satisfy the<br/>
dependencies in the okular Makefile. But once that was done it seems to<br/>
work. I wasn't too sure that it was actually using pdfium, but when I<br/>
moved the poppler generator out of the way I could see that it is<br/>
working. Some small differences in appearance... So at least it works as<br/>
a proof-of-concept...<br/>
<br/>
On 18/01/17 10:14, Jonathan Schultz wrote:<br/>
> Looks interesting. How does it compare (performance, features, etc.)<br/>
> with the Poppler plugin?<br/>
><br/>
> Any chance you could save us the bother of building ourselves and post a<br/>
> link to an executable?<br/>
><br/>
> Cheers,<br/>
> Jonathan<br/>
><br/>
> On 18/01/17 03:30, Gilbert Assaf wrote:<br/>
>> Hi all,<br/>
>><br/>
>> I worked on an okular pdf plugin using pdfium as a backend. At this<br/>
>> point it is little more than a “proof-of-concept”. But you can already<br/>
>> view simple pdf files.<br/>
>><br/>
>> I would like to get some feedback on this: maybe somebody else is<br/>
>> already working on an okular pdfium plugin? I am relatively new to KDE<br/>
>> and don’t know all the development processes.<br/>
>> How do you normally proceed from here on? Reviewboard? A personal branch?<br/>
>><br/>
>> I attached a git patch file, if somebody would like to try it out.<br/>
>><br/>
>> A small warning: pdfium only works on x64 and at this point it is<br/>
>> basically a mixture of static and shared libraries. So you definitely<br/>
>> have to compile it yourself.<br/>
>><br/>
>> Thanks,<br/>
>> Gilbert<br/>
>><br/>
>> === Install depot tools ===<br/>
>> Needed for fetching and building pdfium<br/>
>> See instructions:<br/>
>> <a href="https://www.chromium.org/developers/how-tos/install-depot-tools" target="_blank">https://www.chromium.org/developers/how-tos/install-depot-tools</a><br/>
>><br/>
>> === Install pdfium ===<br/>
>> mkdir repo<br/>
>> cd repo<br/>
>> gclient config --unmanaged <a href="https://pdfium.googlesource.com/pdfium.git" target="_blank">https://pdfium.googlesource.com/pdfium.git</a><br/>
>> gclient sync<br/>
>> cd pdfium<br/>
>> export PDFIUM_DIR=`pwd`<br/>
>> gn gen out/Debug --args="pdf_enable_xfa=false pdf_enable_v8=true<br/>
>> use_sysroot=false is_debug=true"<br/>
>> ninja -C out/Debug pdfium<br/>
>><br/>
>> === Compile Okular ===<br/>
>> cd <okular build dir><br/>
>> cmake .. -DPDFIUM_ROOT_DIR=$PDFIUM_DIR<br/>
>> You probably have to add $PDFIUM_DIR dir to your LD_LIBRARY_PATH variable<br/>
></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>