[poppler] Thoughts on OO-ifying and modularising the pdftothml utility?

Albert Astals Cid aacid at kde.org
Sat Oct 29 04:31:12 PDT 2011


A Dissabte, 29 d'octubre de 2011, Alec Taylor vàreu escriure:
> The current pdftohtml.cc is extremely in need of modularity. I'm
> considering making the utility more modular, to the point of making it
> object-orientated.
> 
> int main(int argc, char *argv[])
> 	    PDFtoHTML *foo = new PDFtoHTML;
> 	    if(!foo->setArgs(argDesc, &argc, argv) {
> 	    	    delete foo;
> 	    	    return false;
> 	    else {
> 	    	    delete foo;
> 	    	    return true;
> 	    }
> }
> 
> Public member functions could include:
> GBool PDFtoHTML::toXML(char passes);
> GBool PDFtoHTML::toHTML(GBool images, GBool complex);
> GBool PDFtoHTML::PDFinfo();
> GBool PDFtoHTML::removeRestrictions();
> 
> &etc
> 
> What do you think? - Worth doing? - Useful? - Too far?!

I don't see any usefulness in this. Rembemer pdftohml is not meant to be a 
library but a command line utility, so i don't see what we gain from making it 
more modular.

OTOH if what you are suggesting is making a proper library of what 
pdftohtml&friends provide, that is a different question altogether and given 
the current wave on interest on it might make sense.

Albert


> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler


More information about the poppler mailing list