[Okular-devel] Re: Contemplating an interesting okular feature

Albert Astals Cid aacid at kde.org
Sun Dec 5 11:51:03 CET 2010


A Diumenge, 5 de desembre de 2010, Mike McWilliam va escriure:
> Hello All,

Hi Mike,

(If others want to answer him please CC him since he is not subscribed)

> 
>           I have a need for an interesting okular feature. I am
> contemplating developing it... but... I am new to okular and want to
> run it by the okular dev community first to get your opinions. Let me
> begin with the problem I am trying to solve....
> 
> PROBLEM
> ========
> 
>            I have a Nook which is really crappy at rendering PDF's.
> Upon extensive review it is difficult to root and there is a lot of
> risk of bricking the device. So I want a way of recreating PDF's
> formatted for the nook screen (Small pages). I think/hope that one of
> the solutions could be a useful feature. If not, maybe a couple
> pointers from you all to get me on my way developing a custom okular
> for my purposes.
> 
> SOLUTIONS
> =========
> 
>            1) Simple: Use the copy and paste gui commands to
> automatically generate a Latex document
>                    Here the user would simply copy blocks of text and
> images. Instead of being presented with options to copy the text and
> images, you presented with options asking whether it is various
> elements in a latex document (heading, equation, image etc..). All the
> while this information is being recorded in a *.tex file along with
> *.pdf's for the images and possibly equations.
>            2) Use okular to copy blocks of PDF's into smaller pages
> (paper size wise), then save it.
> 
> MY REQUEST FOR HELP
> ===================
> 
>              I am willing to take this on myself, but hoping to get a
> little help at the start. Basically for option 1 I will need to know
> where in the code the copy functions are initiated. Might need some
> help getting it to compile. Naturally I don't have all these KDE
> libraries and such.

Sincerely i do not think this fits into the Okular philosophy. We want Okular 
to be a viewer and what you are proposing is more a editor/converter than a 
viewer. Also i'm not sure basing your feature in Okular would help you much 
than starting from scratch since i don't really see much code you would reuse 
other than "showing a page of a PDF" which is dead simple if you using 
poppler-qt4 bindings.

Of your two solutions both seem really not easy to do for me.

The first would effectively be a PDF to latex converter that given how 
different PDF is from latex i bet would not be easy at all except for very 
trivial PDF files.

The second is also very hard given the internal structure of a PDF (that is to 
say it almost doesn't have any structure) unless of course you want to go the 
easy and bad way of rasterizing the contents to an image and then creating a 
PDF with the image, this would be easy but you would lose any benefit of a PDF 
like zoom, text search, etc.

All in all i would suggest you to care a bit more of your converting 
algorithms than on what are you going to use as user interface, as the user 
interface part is really the trivial part of the job here.

Good luck, 
  Albert

> 
> Thanks for the help
> Mike
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel


More information about the Okular-devel mailing list