> > > > Very great. Lot of thanks for sharing your progress. For poppler you may > like to have a look at http://people.freedesktop.org/~aacid/docs/qt4/ and > for implementations using it > http://mail.kde.org/pipermail/okular-devel/2011-May/009429.html ( > http://quickgit.kde.org/index.php?p=okular.git&a=summary ). > > For the initial skeleton what means the very first code to start a > PDF-importer with I could provide some helping hands to get it done. We > could start with creating a branch in our git and add a > calligra/filters/words/pdfimport directory and then copy over the > Ascii-filter + rename + adapt the CMakeLists.txt + link against libpoppler > and create the first lines of code that use libpoppler to have a look first > code that extracts content from a PDF and writes it into a ODT. You can > ping me at IRC or write a mail to get started on this :-) > > Hello Sebastian,
I did little bit of modification in code on my system, I created a new direcory pdfimport inside calligra/filters/words.I copied import files, cmakefile and .desktop file from ascii directory and renamed them to pdfimport. this is my CMakeList.txt - http://paste.kde.org/176486/ and this is word_pdf_import.desktop file - http://paste.kde.org/176498/ I added the line > add_subdirectory( pdfimport ) in CMakeList.txt in calligra/filters/words directory. I tried building the code after this without doing much modification to pdfimport.cpp and pdfimport.h (the code in them was same as asciiimport.cpp amd asciiimport.h). Build was successful but I didn't see any change in filter after launching calligraword, I mean the 'Open Document' window still wasn't showing the pdf documents neither there was any entry as pdf in drop down list of filter. So, What all changes do I need to do and in which all file to at least make pdf file visible in 'Open Document' dialog and make it accept it? and, second thing, I was going through the code of asciiimport.cpp, in that code the input file has been passed to a QTextStream object and appropriate codec is set to the object. QTextStream stream(&in); stream.setCodec(codec); and after that using a QString the lines are being appended to the document- QString line = stream.readLine(); . . . bodyWriter->addTextSpan(line); whereas using poppler there is no such straing forward option to get the text line by line, I think. One method I could think of was to go to each pdf page one by one and use QString text(const QRectF &rect, TextLayout) function to get the text within a rectangle into a QString, but in this case what value of rect should I pass to the function and apart from this what other method I can use to fetch the text out of pdf using poppler? Please give some suggestion. Thank you :) * * * * Pankaj UG Student *|* Dept. of Computer Science and Engineering IIT Madras, Chennai, India
_______________________________________________ calligra-devel mailing list calligra-devel@kde.org https://mail.kde.org/mailman/listinfo/calligra-devel