<div dir="ltr">> Okular basically just needs you to render into an image, if you can do that<br><div>> with Qt WebEngine, you can do it, also you need to support text extraction<br>> with positions so that search works.<br><div><br></div><div>Well I know that Caligra uses QWebPage to render its epub documents, so it is definitely possible. Unfortunately it extracts the epub to /tmp and then loads the files from there. As far as I can tell there is no way to alter the way QWebPage loads its resources the way that QTextDocument can.</div><div><br></div><div>How do you feel about extracting the contents to a temporary folder before reading it? I know libepub provides a nice API that doesn't require extracting anything for rendering, but it doesn't look like it'll be simple to use with QWebPage.</div><div><br></div><div>> Basically you need to replace the use of qtextdocument with something else</div>> while still implementing the generator plugin api.<div><br></div><div>Is there some documentation on the generator plugin api?</div><div><br></div><div>Thanks</div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 17, 2015 at 5:06 PM Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">El Saturday 17 October 2015, a les 12:26:27, Afief Halumi va escriure:<br>
> Hello,<br>
<br>
Hi<br>
<br>
> I've been reading a lot of epub files using Okular lately and this specific<br>
> bug has been extremely annoying. I tried to look at what is causing it in<br>
> the codebase and it seems that QTextDocument doesn't support the CSS<br>
> properties used by many documents.<br>
><br>
> I would like to work on fixing this issue if that's OK with you guys, but<br>
> I'm at a bit of a loss as to where to start... Is the correct approach here<br>
> to add the missing properties in the Qt side of things? But then again,<br>
> books will start using more and more CSS and we will continue playing catch<br>
> up. Is the correct approach to use Qt's WebEngine facilities to render the<br>
> document? That should support most (all?) of the relevant CSS properties,<br>
> but I'm not sure if the Okular architecture supports such a change or even<br>
> if Qt WebEngine can be used in such a way.<br>
<br>
Okular basically just needs you to render into an image, if you can do that<br>
with Qt WebEngine, you can do it, also you need to support text extraction<br>
with positions so that search works.<br>
<br>
> Would be great if someone could give me a couple of pointers on how to<br>
> approach this issue. I have some basic experience with Qt, but I only used<br>
> it to create basic management GUIs and never for something as complex as<br>
> document rendering.<br>
<br>
Basically you need to replace the use of qtextdocument with something else<br>
while still implementing the generator plugin api.<br>
<br>
Good luck :)<br>
<br>
Cheers,<br>
Albert<br>
<br>
><br>
> Thanks,<br>
> Afief Halumi<br>
<br>
_______________________________________________<br>
Okular-devel mailing list<br>
<a href="mailto:Okular-devel@kde.org" target="_blank">Okular-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/okular-devel" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/okular-devel</a><br>
</blockquote></div></div></div>