Commit ffe8ddaf authored by Enrico Ros's avatar Enrico Ros

Copying kpdf_experiments into branch and reordering directories. Look there

for the file naming map and file  versioning. Please wait until the commit
storm ends to report any bug. Albert and Enrico

svn path=/trunk/kdegraphics/kpdf/; revision=374920
parents af788a0b 3e5d5b40
2004-08-25 Albert Astals Cid <tsdgeos@terra.es>
* Completely use xpdf code for rendering that solves most font problems
2004-08-23 Albert Astals Cid <tsdgeos@terra.es>
* Replace xpdf version with lastest one (3.00) that supports PDF 1.5
Tue Aug 27 13:33:19 CEST 2002 - Wilco Greven <greven@kde.org>
o Initial Creation
Here are some notes about the inner structure of kpdf for who wants to take
a look at the project.
*** Rendering:
- The rendering is done by xpdf/splash. xpdf defines 'OutputDev' class that has
been implemented by renderers. Kpdf imported Splash sources; Splash implements
all virtuals from the interface and draws text/image into an inner pixmap.
- Kpdf reimplements the 'SplashOutputDev' iface to basically get notified when
the rendering of a page is finished (and some other features such as collection
of per-page text that permits to implement search).
- Kpdf's QOutputDevPixmap returns a image containing a single redered page.
*** Architecture:
Almost all of the whole kpdf is a KParts::ReadOnlyPart. Plus there is a main
window that embeds the part when used stand alone (see kpdf_shell.cpp/.h and
main.cpp).
The 'Shell' only adds fullscreen capability to the part, a standard
open dialog, a quit button and minor bits of code.
Architecture::Part: (kpdf_part.cpp/.h)
The part owns a centralWidget (with thumbnails in a left column and the view
area on the right), some XMLgui functionalities (zoom actions, search actions,
more...) and some background logic (thumbnail generation, page changes,
loading/saving settings and more).
Architecture::Part:CentralWidget: (part.cpp/.h)
The centralWidget (namely PDFPartView) holds a 'ThumbnailList' (a QTable
composed of 'Thumbnails') and a 'PageWidget'. The central widget has few
accessors to the list of thumbnails, whereas the page widget is accessed
publicly by the core of the Part (this may change soon!).
Architecture::Part:CentralWidget:PageWidget (kpdf_pagewidget.cc/.h)
Displays current page pixmap (holds a QOutputDevPixmap inside). Handles mouse,
keys, scrolling and scrollbars as well. This widget is a qscrollview.
Architecture::Part:CentralWidget:ThumbnailList (kpdf_pagewidget.cc/.h)
This widget is a vertical single column table where cells are thumbnails. This
supports thumbnail scaling and emits a signal when a page is selected between
the list of thumbnails. That widget also generates the thumbnails of the
document using the ThumbnailCreator class.
*** Last Revisions to this document:
2004-10-04 : 0.2 - Albert Astals Cid <tsdgeos@terra.es>
- ThumbnailList creates the thumbnails itself
2004-10-04 : 0.1 - Enrico Ros <eros.kde@email.it>
- just read the code and created this file
TODO - branch version
Legend:
ADD - ADDed
CHG - CHanGed
FIX - FIXed
MRG - MeRGed from head
(*) - Some parts of this item are already done
**** 2005-01-02 - MERGING TO HEAD ****
Urgent fixes in HEAD:
-> REGRESSION: find-as-you-type somewhat broken here
-> FIX 1/2: sync Memory Management (in Document) with the Generator (exp. undoing requests) (may Segfault!)
-> FIX 2/2: check for removing 'canUnloadPixmap' from observers in place of requesting
a list of visible pixmaps
-> FIX: priorities for requests (pageview regular over thumbnails regular over pv preloading ...)
-> FIX: linearize memory pages map iterators in respect to time
More items to add before final freeze:
-> ADD: preloading (very easy, but change request a little)
-> FIX: viewport changes the right way when clicking links and TOC items (also
suggested by Mikolaj Machowski). Create a great viewport definition and merge
it inside the synopsis too. [60% done]
-> link thumbnails view with document [first, the 'Viewport' must be defined]
-> FIX: check for removing 'canUnloadPixmap' from observers in place of a requested
'visiblity list'
More items (first items will enter 'In progress list' first):
-> move toolbar view actions in the PageView instead of the part. maybe.. or not...
-> usability: layout 2PPV [1 2,3 4,5 6] -> [1,2 3,4 5]. add option for 'ebook' style alignment. (by Mikolaj)
-> usability: trigger redraw on 'filter text' on current page (by Mikolaj)
-> watch out for FIXMEs in code
-> fix: requestPixmaps not triggered when exiting fullscreen mode (to verify..I can't reproduce)
-> fix: iterate from older pages to newest ones when freeing memory (not randomly)
-> fix: On continous view mode, if you click to a link that moves you to another
page, then scroll up and click again on the same link it does not work. (by Albert)
-> JJ: convert DocumentInfo to a DomTree containing a few common fields (see the current
implmentation) and being extensible for letting generator developers adding their
custom fields.
-> display current page / total pages (with analog indicator too (progressbar/...))
maybe this can be done on a small widget at the top of the toolbox, displaying
'document' informations (pages, current pg, some metadata, etc..).
Tested a 16px ktoolbar in the left-bottom corner.. looks goos and can be used to
insert some actions that aren't so useful in the main (and bigger) toolbar
-> abstract TextPage generation (the last xpdf dependant class!). then go dancing in the
streets.
-> Dom framework to cache document metadata. It should archive those types of data:
- Synopsis will go there after 1st generation (so we can edit it too)
- Document info (after the 1st gen)
- Bookmarked pages
- Edited pages (rotated/with_data for example)
- Overlay editing (hilighting/notations/etc..)
- Presentation related overrides (FS mode, individual / global transitions)
- ..more stuff.. but this isn't a problem, since a QDom is flexible by design
The Object will reside into the Document and must not be accessible by Oservers in
a direct way. Dom format, relations to other classes and accessing must be specified
in a separated diagram or text file.
-> right click and drag while in 'scroll' mode changes to 'selection' mode and selects
-> add kpdf manual in PDF format loaded on the first startup or on menu->help->manual
this visually explains basic usage, mouse buttons functions & more..
-> take care of TODOs in code
-> find: scroll page if the the searched string is not visible [after 'viewport changes']
-> ADD: click over image allows "save image" [60% done]
-> screen editing (annotations): framework (BR67300,BR62793)
-> screen editing (annotations): tools (BR67300)
-> ADD: bookmark support, with clip overlays or something.. and the bookmark
widget. or maybe they should modify the thumbnail. note: bookmark property
is already in place. Saving bookmars for a document will be cool too.
-> session support: restoring page location (BR82589)
-> export all text in plain_text/html
-> extract(export?) images (have a look at ImageOutputDev.cc and pdfimages.cc from xpdf (not in our xpdf sources))
-> text selection in wordprocessor style (very hard/impossible)
-> implement history (mainly for actionNamed)
-> history as a toolbox child (collecting DOs's setPage calls)
-> zoom: fit text (with configurable margin)
-> open gzipped (.pdf.gz?) files
-> kttsd output with menu entries. speech{document/page/selection}. (patch available - enrico)
-> kttsd alternative (1): autodetect "/dev/speech" (speechd/festival) and provide reading
-> automatic online dictionaries / translators (BR80338)
-> add OCR for building TextPages out of pure graphical (aka scanned) pages
-> merge head copyright headers (by albert)
-> wrong zoom buttons order (BR74248) (check consistancy with kdvi/kghostview/.. (not konq))
-> rotate the whole document / individual pages
-> fullscreen pdf view (presentations-like) with some gfx tools
-> incremental zoom with fast-refresh (tested but flickering!) or contour tracing
-> investigate 'Splash' lack of smoothness at low resolutions (see lines in thumbnails)
-> add search on the toc widget (a prune on type lineedit like in thumbnails widget)
-> goto 'logical' page (usually differs from pdf's page) (req. by Luca Burrelli)
-> use wallet for storing passwords of encrypted files
-> use shortcuts for next and prev page even in presenatation mode (by Tobias Koenig)
-> set a marker on the pdf file to immediately start presentation when opening it (by Tobias Koenig)
-> move some document related features from part to the document (see find, goto dialog, ...)
Done (newest feature comes firts):
-> Merged on HEAD on 2005-01-02 (The branch is frozen, development continues here)
-> FIX: Fix my update cursor FIX :-D
-> ADD: Make kpdf aware of Find and GoToPage actions
-> FIX: Update cursor correctly when a link moves to a page and the cursor is over a link on that page
-> ADD: Asyncronous PDF Generator implementation (for the user: faster UI, preloading, etc..)
-> FIX: Memory manager (free cache if needed, avoid disk swap and oom)
-> ADD: Presentation View (only the 'glitter' transition implemented for now)
-> FIX: FixPack1 [dyn_zoom repaints, initial panel width, zoom_lineedit focus proxy, searchwidget refactor{thumbs restoring on clear, buttons size, less code}, hilight bookmarked thumbnails]
-> FIX: Some fullScreen loving, if we are on fullscreen put an action on RMB menu ti get out of it, if we were on fullScreen mode on exit bring back correctly if we were also seeing toolbar or menubar
-> FIX: When in non continous mode and scrolling up a page, set the viewport at the bottom of the page (Albert)
-> ADD: Show the window maximized when the user opens the program for the very first time (Albert)
-> ADD: Use 'Generators' as providers for contents generation
-> ADD: Add properties dialog (Albert)
-> ADD: Support for show/hide menubar in rmb menu, different from HEAD so that supports Konqueror too (Albert)
-> ADD: Watch File option (Albert)
-> ADD: import Marco Martin's "another kpdf icon" (kde-look: 16146) (Albert)
-> ADD: dynamic zoom with mid mouse button (click and drag up-down to zoom in-out)
-> FIX: merge select text & select gfx, two sections on the same pop-up menu
-> ADD: reading aids (inverted display, recolor, black/white, draw link border, draw image border)
-> FIX: zoom preserved when switching modes and flickerless drawing
-> ADD: Printing as PS instead of as image (Albert)
-> ADD: Remember page on session logout and put the document in it on session restore (Albert)
-> ADD: gfx capturing tool
-> ADD: composited renderer framework (in addition to a fast light one)
-> FIX: pageview repaint done internally (speed boost and reduced memory consumption)
-> ADD: KConfigXT settings framework and Accessibility config (acc. code mostly not done)
-> FIX: workaround for scrollview bug 1/2 (painting hidden widgets under certain circumstances)
-> ADD: zoom into a rect defined by mouse (aka zoom to window)
-> FIX: sheet rotation in landscape case
-> ADD: Some dcop functions (goToPage, openDocument and give # of pages) (Albert)
-> MRG: link following ('actionMovie' kind is missing)
-> ADD: text selection (rectangular blocks) in selection mode
-> ADD: autoscroll page with Shift+Up/Dn keys (exact konqueror's behavior)
-> CHG: remake single page mode
-> FIX: zoom buttons in sync with text
-> ADD: continous mode
-> ADD: multiple pages per view (gui selects 1 or 2 ppv)
-> MRG: the option to open password protected files (from head)
-> MRG: the Table Of Contents (from head)
-> ADD: a 'search bar' with prune-as-you-type feature
-> MRG: Albert's search ported and implemented case sensitive
-> CHG: smart handling of pixmap using an Observer ID (thumbnails are gone, only pixmaps now)
-> FIX: some toolbar/menu changes
-> ADD: outline bottom and right edges (of pages)
-> FIX: centering pages in the view
-> FIX: kpdf output at 100% has exactly the same size as acroread now
-> CHG: qsplitter layouting
-> FIX: zooming works as expected (and added 'fit to page' too)
-> ADD: new go to page dialog
-> GHG: previews sorted by visible areas (prioritize items where the scrollbar is)
-> FIX: previews speedup: 50-100%
-> CHG: use local instead of X memory for thumbnails (..)
-> MRG: merge lots of kpdf_part and part (centralview) code (to simplify/clenup)
-> Branch 'kpdf_experiments' created at this point
-> ADD: Completely use xpdf code for rendering that solves most font problems (Albert)
-> MRG: Replace xpdf version with lastest one (3.00) that supports PDF 1.5 (Albert)
Here comes a list of suggestions from a dot post http://dot.kde.org/1095261317 and IRC:
Tool: ruler, measure: distance, perimeter, ?area?
Tool: color picker
Annotations: yellow notes 'post-it' like
Export: export to other formats keeping formatting (a dream.. except for PNG :-)
PDF: <theICEBear> pdf forms support.... :D if at all possible
Bugs to close after merging to HEAD
BR88661: (thumbnail prev. is blocking) Not only it's threaded, but it generates
thumbnails only for the few visible items inside the thumbnaillist.
BR72347: (search doesn't work) Closeable NOW. The feature is already on HEAD.
BR72165: (showing a "scanned document PDF" is very slow). By running many tests
on xpdf and kpdf_experiments, I measured 5-15% speed loss (due to
internal pixmap conversions). No noticeable difference.
BR89835: (PDF pages to be aligned centrally). Done in branch.
BR90026: (crash). Can't reproduce on branch.
BR74435: (smooth transition/continous mode) It's in from sept-27.
BR80164: (2-up view of pdf pages) It's in from sept-26.
BR69092: Zoom displayed/internal values synced with fixed value or displayed page.
It is editable and the list gets cleaned and rebuilt on changes.
BR94385: PDF doesn't show PDF properties
noinst_LTLIBRARIES = libconf.la
libconf_la_SOURCES = dlggeneral.ui dlgperformance.ui dlgaccessibility.ui \
preferencesdialog.cpp settings.kcfgc
INCLUDES = -I$(srcdir)/.. $(all_includes)
METASOURCES = AUTO
kde_kcfg_DATA = kpdf.kcfg
This diff is collapsed.
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>DlgGeneral</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgGeneral</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>255</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
<property name="title">
<string>Program look</string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout9</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_ShowLeftPanel</cstring>
</property>
<property name="text">
<string>Show &amp;left panel</string>
</property>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_ShowSearchBar</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Show &amp;search bar in thumbnails list</string>
</property>
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_ShowScrollBars</cstring>
</property>
<property name="text">
<string>Show scroll&amp;bars</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_ShowOSD</cstring>
</property>
<property name="text">
<string>Show &amp;hints and info messages</string>
</property>
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>pixmapLabel1_2</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="pixmap">
<pixmap>"kpdf", 32</pixmap>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacerV1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</hbox>
</widget>
<widget class="QGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
<property name="title">
<string>Presentation</string>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout12</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_SlidesGlitterTrans</cstring>
</property>
<property name="text">
<string>Use 'glittering' &amp;transition</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_SlidesShowProgress</cstring>
</property>
<property name="text">
<string>Show &amp;progress indicator</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_SlidesShowGrayBack</cstring>
</property>
<property name="text">
<string>Show light &amp;gray background</string>
</property>
</widget>
<widget class="QCheckBox">
<property name="name">
<cstring>kcfg_SlidesShowSummary</cstring>
</property>
<property name="text">
<string>Show s&amp;ummary page</string>
</property>
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="pixmap">
<pixmap>"kpresenter_kpr", 32</pixmap>
</property>
</widget>
<spacer>
<property name="name">
<cstring>spacerV2</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</vbox>
</widget>
</hbox>
</widget>
<spacer>
<property name="name">
<cstring>spacer3</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<connections>
<connection>
<sender>kcfg_ShowLeftPanel</sender>
<signal>toggled(bool)</signal>
<receiver>kcfg_ShowSearchBar</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<includes>
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="global" impldecl="in implementation">kiconloader.h</include>
</includes>
<pixmapfunction>DesktopIcon</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
</UI>
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>DlgPerformance</class>
<widget class="QWidget">
<property name="name">
<cstring>DlgPerformance</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>252</width>
<height>218</height>
</rect>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QButtonGroup">
<property name="name">
<cstring>kcfg_MemoryLevel</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>5</hsizetype>
<vsizetype>4</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Memory Usage</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QRadioButton">
<property name="name">
<cstring>lowRadio</cstring>
</property>
<property name="text">
<string>&amp;Low</string>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>normalRadio</cstring>
</property>
<property name="text">
<string>&amp;Normal (default)</string>
</property>
</widget>
<widget class="QRadioButton">
<property name="name">
<cstring>aggressiveRadio</cstring>
</property>
<property name="text">
<string>&amp;Aggressive</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>descLabel</cstring>
</property>
<property name="text">
<string>...</string>
</property>
<property name="textFormat">
<enum>PlainText</enum>
</property>
<property name="alignment">
<set>WordBreak|AlignVCenter</set>