Well, it works when using the statically linked version of PoDoFo. Very nice, especially if you use a simple page like the LineTest page created by CreationTest! :-)
Of course it will be a real big amount of work to make this anywhere complete, though it is helpful that QPainter now almost supports everything PDF needs. Regarding your implemantion, it looks fine for basic needs. Leonard pointed once out that one needs the concept of Display Lists for more complicated operations or fast rendering, but as you just delegate to QPainter and do not have fast rendering as a major goal it seems fine. For PoDoFoBrowser, I think it would be fine if you would have the preview side by side with the pages content stream. And if you type some PDF code into the content stream, like "0 0 1 rg 100 100 m 200 200 l" it should immediately draw a blue line. But this is dreaming :) regards, Dom Am Freitag, 2. Januar 2009 schrieb Dominik Seichter: > Hi Pierre, > > It looks very interesting, but I only have looked at the code and have not > had a chance to try it yet. Currently I get a really strange linker error, > which seems to be a problem inside PoDoFo itself. As soon as I figured it > out, I will try your patch. Promise! > > FYI, below you can find my error message, maybe someone has an idea, why > the linker cannot see PdfRefCoutedBuffer::FreeBuffer() and > PdfContentsTokenizer::ReadNext(). > > regards, > Dom > > make -f src/CMakeFiles/podofobrowser.dir/build.make > src/CMakeFiles/podofobrowser.dir/build > make[2]: Entering directory > `/home/dominik/Desktop/Programming/podofo/podofobrowser-build' > Linking CXX executable podofobrowser > cd /home/dominik/Desktop/Programming/podofo/podofobrowser-build/src > && /usr/local/bin/cmake -E cmake_link_script > CMakeFiles/podofobrowser.dir/link.txt --verbose=1 > /usr/bin/c++ -fPIC CMakeFiles/podofobrowser.dir/backgroundloader.o > CMakeFiles/podofobrowser.dir/podofoutil.o > CMakeFiles/podofobrowser.dir/pdfobjectmodel.o > CMakeFiles/podofobrowser.dir/podofobrowser.o > CMakeFiles/podofobrowser.dir/podofoview.o > CMakeFiles/podofobrowser.dir/main.o > CMakeFiles/podofobrowser.dir/hexwidget/QHexView.o > CMakeFiles/podofobrowser.dir/qrc_podofobrowserrsrc.o > CMakeFiles/podofobrowser.dir/moc_backgroundloader.o > CMakeFiles/podofobrowser.dir/moc_podofobrowser.o > CMakeFiles/podofobrowser.dir/moc_pdfobjectmodel.o > CMakeFiles/podofobrowser.dir/hexwidget/moc_QHexView.o -o > podofobrowser -rdynamic -Wl,-Bstatic -lQtUiTools -Wl,-Bdynamic -lQtGui > -lpng -lSM -lICE -lXi -lXrender -lXrandr -lfreetype -lfontconfig -lXext > -lX11 -lm -lQtXml -lQtCore -lz -lgthread-2.0 -lglib-2.0 -lrt -lpthread -ldl > /usr/local/lib/libpodofo.so -Wl,-rpath,/usr/local/lib > CMakeFiles/podofobrowser.dir/podofoview.o: In function > `PodofoView::renderStream(QByteArray const&)': > podofoview.cpp:(.text+0x31c9): undefined reference to > `PoDoFo::PdfContentsTokenizer::ReadNext(PoDoFo::EPdfContentsType&, char > const*&, PoDoFo::PdfVariant&)' > CMakeFiles/podofobrowser.dir/podofoview.o: In function > `PoDoFo::PdfRefCountedBuffer::DerefBuffer()': > podofoview.cpp: > (.text._ZN6PoDoFo19PdfRefCountedBuffer11DerefBufferEv[PoDoFo::PdfRefCounted >Buffer::DerefBuffer()]+0x4b): undefined reference to > `PoDoFo::PdfRefCountedBuffer::FreeBuffer()' collect2: ld returned 1 exit > status > make[2]: *** [src/podofobrowser] Error 1 > make[2]: Leaving directory > `/home/dominik/Desktop/Programming/podofo/podofobrowser-build' > make[1]: *** [src/CMakeFiles/podofobrowser.dir/all] Error 2 > make[1]: Leaving directory > `/home/dominik/Desktop/Programming/podofo/podofobrowser-build' > make: *** [all] Error 2 > domi...@dom2duo:~/Desktop/Programming/podofo/podofobrowser-build (66)> > > Am Freitag, 2. Januar 2009 schrieb Pierre Marchand: > > Hi, > > > > I’ve played a bit with Podofobrowser. And here is an > > insomnia-patch^^concept which allow viewing of content streams (to be > > honest, just paths). The result is not really interesting but i would be > > happy to get your opinions about the way it’s done and eventually if you > > see obvious problems which would prevent to add support for some kind of > > objects. I know the fastest way would be to just use Poppler, but I’m > > happy at hacking PDFs and would be thrilled to support manipulation of > > PDF objects. > > > > TIA -- ********************************************************************** Dominik Seichter - domseich...@web.de KRename - http://www.krename.net - Powerful batch renamer for KDE KBarcode - http://www.kbarcode.net - Barcode and label printing PoDoFo - http://podofo.sf.net - PDF generation and parsing library SchafKopf - http://schafkopf.berlios.de - Schafkopf, a card game, for KDE Alan - http://alan.sf.net - A Turing Machine in Java **********************************************************************
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------
_______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users