Commit graph

22 commits

Author SHA1 Message Date
Enrico Ros 05924776fa The long awaited (by me) memory manager is in place. It unloads pixmaps
not on screen starting from the oldest generated one. Rules (aka memory
profiles) are simple by now, but they work as expected.
Plus: added functions for getting Linux total memory and free memory by
querying the /proc filesystem. Generator creation by mimetype. -Fixes.
BROKEN: thumbnail, presentation (need to reimpl a virtual method)
TODO1: notify generators when cancelling jobs.
TODO2: add forward caching.
TODO3: rationalize code, clean it up and update README.png
TODO4: periodically check for free memory and unload pixmaps if needed.
TODO5: wisely choose default values for memory profiles.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372514
2004-12-21 12:38:52 +00:00
Enrico Ros 0c5cd4e01a Fixed a GeneratorPDF <-> KPDFOutputDev bug.
Abstracted xpdf's Outline to a Dom Tree. Fixed MERGE tags through the code.
Added comments (documentation) to KPDFDocument class and other classes in
document.h. Changed a little Generator interface.
Moved code from toc.h/.cpp to GeneratorPDF and shrinked a lot.

TODO (now): Convert TOC (widget) to use the Dom tree as data source.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369914
2004-12-11 17:25:03 +00:00
Enrico Ros 5f4236d801 Abstracted Generator and ported xpdf dependant code (most of) to the
GeneratorPDF class. Adapted the whole KPDFLink class to a hieracy of
classes and added a Viewport description associated to 'Goto' links.

Link hasn't got geometry properties. A PageRect class has born to describe
all 'active rects' on a page (hand pointed on mouse over). PageRect can
contain many type of objects such as Links or other active items (images,
...). The Page class now stores PageRects only (no more geometric Links,
as already said).

Added a DocumentInfo class filled in by generators and used by the
PropertiesDialog.

Outline hasn't been abstracted while now, but a DocumentSynopsis class
is in place and work needs to be done to make GeneratorPDF fill in a
DocumentSynopsis instance and pass it to the Toc widget.

Note1: Document has nothing more to do with xpdf, it only commands its
generator.
Note2: 2 remaining classes to be abstracted: Outline, TextPage. But
waning..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369651
2004-12-10 16:04:45 +00:00
Enrico Ros ab5fd168d6 Leakfix! Option to disable KPDFActiveRects generation. Optimize.
@style: kebase/kicker/HACKING.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=361181
2004-11-07 14:07:08 +00:00
Enrico Ros 222f193379 2/2 Preliminar suport for saving images with RMB popup.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=356242
2004-10-20 16:31:30 +00:00
Enrico Ros d07efe6882 Preliminar support for saving images with RMB popup.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=356240
2004-10-20 16:27:20 +00:00
Enrico Ros 2695164b6e half link stuff foreported from head. Links are intercepted by our oDev and
stored as KPDFLink inside KPDFPage(s) :-). What we have now: links are
detected when hovering them on a page eve in multiple-pages-per-view mode.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=351190
2004-10-02 14:30:30 +00:00
Enrico Ros 4569e4eea9 Backported search. Clean, elegant and SOO FAST after the 1st loop (well, if
you have enough ram). Based on aacid's search code. This implements case
sensitive search too (a little tricky but it worths). Finally done.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=347051
2004-09-16 21:04:49 +00:00
Enrico Ros 727d5dd57a More refactoring. Big internal changes but nothing visible.. apart from a
memory reduction on the displayed page. OutputDev under big changes.
Now DocumentObservers have an unique ID so they can queue requests to
documents and they get their data stored in Page(s). No more Pixmaps or
Thumbnails requests, every observer can request a custom-sized pixmap for
a given page. That makes room for new observers (like a cool perspective
book like page viewer or stacked viewer or what your fantasy suggests :-).

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=346792
2004-09-15 20:45:00 +00:00
Albert Astals Cid b8c2ee050f QOutputDevKPrinter does not need to inherit from QOutputDev
Bye bye QOutputDevPixmap

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=344825
2004-09-07 22:09:50 +00:00
Enrico Ros 44783a7130 Few bits changed just to test the branch. First commit on kpdf_experiments.
The branch has been created by Albert Astals Cid and Enrico Ros to try to
rearrange the code of kpdf.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=344552
2004-09-06 23:22:36 +00:00
Albert Astals Cid e456dfaafb - Make find next work
- Do not allow to find if there's no document

svn path=/trunk/kdegraphics/kpdf/; revision=342164
2004-08-28 14:18:45 +00:00
Albert Astals Cid be2c109b13 I broke printing -> fix it
Better selection of the text found at searching
m_currentPage in kpdf_part now 1 -> first page instead 0 -> first_page, is what PDFDoc uses
Some code has been commented out, it is not used by now
Search works on all pages, not only current one

svn path=/trunk/kdegraphics/kpdf/; revision=342068
2004-08-28 09:27:38 +00:00
Albert Astals Cid cf814647b4 kpdf gets........ FIND TEXT !!!!!!!
It works !!!!!!
At the moment is very primitive (try to find withouth document -> crash, only find on the current page, no find next, selection box is not 100% acurate) but i only need some more time to make it work.

svn path=/trunk/kdegraphics/kpdf/; revision=341615
2004-08-26 23:25:52 +00:00
Albert Astals Cid 045b4a3df7 While i was waiting to kdelibs/kdebase 3.3 to compile i had some time so...
Here comes the big copyright patch for kpdf, i've updated all files to have a copyright header, some did not have, and some had very diferent structures. Now all of them have the same structure
Copyright (C) years name <mail>
The names that figure in the copyright header are all the ones of people that ever comitted something to that particular file.
I am CC'ing to all of you because maybe someone thinks his commits was so small that does not want the copyright for it, so go to the particular file and remove your line.
Also if a particular file came from other place and you know the copyright holder of it please add it to the headers.

CCMAIL:greven@kde.org
CCMAIL:Christophe.Devriese@student.kuleuven.ac.be
CCMAIL:montel@kde.org
CCMAIL:mueller@kde.org
CCMAIL:kde@jamesots.com
CCMAIL:kpfeifle@danka.de
CCMAIL:ccheney@cheney.cx
CCMAIL:malcolm.hunter@gmx.co.uk
CCMAIL:molkentin@kde.org
CCMAIL:andygoossens@telenet.be
CCMAIL:devriese@kde.org
CCMAIL:crossfire@babylon2k.de
CCMAIL:stampede@coltec.ufmg.br
CCMAIL:bastian@kde.org
CCMAIL:binner@kde.org
CCMAIL:benjamin@csh.rit.edu
CCMAIL:l.lunak@kde.org
CCMAIL:wheeler@kde.org
CCMAIL:kloecker@kde.org
CCMAIL:will@csociety.org
CCMAIL:helio@conectiva.com.br

svn path=/trunk/kdegraphics/kpdf/; revision=341561
2004-08-26 21:17:24 +00:00
Albert Astals Cid 264b6249ab QOutputDev is no longer a OutputDev subclass but a SplashOutputDev sublclass. That makes xpdf do all the work related to rendering (sorting lots of problems with fonts, etc). That should improve the render quality of kpdf drastically.
svn path=/trunk/kdegraphics/kpdf/; revision=340973
2004-08-25 16:27:34 +00:00
Albert Astals Cid ee86e7f46b - When xpdf calls fill it wants to paint the outline of the filling area with the same color you got with updateFillColor and not only the inside of the fill area. That fixes the problem of small lines not appearing.
- Remove unused includes
 - Xpdf can't (does not) render fonts of type3 so don't try to be better than it
 - QChar c = QChar ( u [i] ) -> QChar c = u[i];

svn path=/trunk/kdegraphics/kpdf/; revision=340564
2004-08-24 17:36:52 +00:00
Albert Astals Cid 3abd57ea99 - Put xpdf 3.00 in the xpdf, goo and fofi drawers to bring the PDF 1.5 support that version has to kpdf
- Remove not used files of xpdf (images, etc) that we don't need to distribute

Please test if your kpdf behaves equally that older versions (it should only have somewhat better support to PDF 1.5)

svn path=/trunk/kdegraphics/kpdf/; revision=339928
2004-08-23 00:05:01 +00:00
Christophe Devriese 9c34bd7051 Licence updates
svn path=/trunk/kdegraphics/kpdf/; revision=279822
2004-01-15 05:42:12 +00:00
Christophe Devriese 5b35aa8b1a dded printing support (bug 65017)
-> we did not add or change any i18n() strings
-> ------- Additional Comment #1 From Stephan Kulow 2003-09-27 12:38 -------
that's more a blocker bug than a wishlist ;(

svn path=/trunk/kdegraphics/kpdf/; revision=276107
2004-01-02 17:46:06 +00:00
Helio Castro 100be6fae4 - Change old QArray to QMemArray
svn path=/trunk/kdegraphics/kpdf/; revision=242827
2003-08-15 01:39:28 +00:00
Christophe Devriese 0edb09e928 imported code from qpdf, now it works again !
svn path=/trunk/kdegraphics/kpdf/; revision=220285
2003-04-15 12:14:00 +00:00