A Dilluns, 31 d'octubre de 2011, Alec Taylor vàreu escriure: > Good morning, > > After various discussions on the mailing-list, I've thought of an > architectural change, and would like to hear your opinion of it. > > Create a new project, put it in the /utils/ folder (or /util/ folder) > lets call it: ConvertPDF. > > C:\usr\src\poppler\utils>tree > . > > |-- ConvertPDFt.h > |-- ConvertPDF.cc > |-- CMakeLists.txt > | > | `-- modules > | > | |-- pdftohtml.cc > | |-- \* &etc */ > > Style: > • Depending on what libraries are installed, different components of > ConvertPDF will be enabled. i.e. if you only compiled it with > pdftohtml support, [using macros] only pdftohtml related headers and > files will be included. > > Info: > • Running the tool will give "ConvertPDF <version>\n built with > pdftohtml <version>\n\n<available-args>\n". > > Advantages: > • By integrating all projects currently in the utils folder into the > one project will simplify tool usage, and help reduce repeat code.
I don't really see it does simplify tool usage at all, since pdftohtml has a -xml argument that pdftoppm does not have, so tool arguments will still be tool dependant. About code reducing, yes, it can help you reducing a few loops, no big deal imho. > • It will also help pave the way for cleaner code (just #include > "..\ConvertPDF.h") and In my opinion one single include instead of multiple ones will actually lead to worse code since you do not have any kind of modularization. > • [perhaps most notably] change all projects currently in the \utils\ > subdirectory into libraries. As I already said in your other email you did not answer, yes, making libraries out of binaries might be intersting. Which kind of API do you suggest for this? E.g. can you give me the header of the API for pdftotext and pdftoppm? > > Please share your thoughts on this idea. If they are positive, I'd be > happy to work with you, starting from in one month. Problems: * People know pdftops, pdftotext, pdftoppm names, with your suggestion they will cease to exist. * Makes merging with future xpdf releases harder Albert > > All the best, > > Alec Taylor > _______________________________________________ > poppler mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/poppler _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
