04.15.06

Document Outline

Posted in Projects, ePDFView at 9:28 pm by Jordi Fita

I have updated the ePDFView’s code to load and display the PDF document’s outline, if it has any. I haven’t released the code yet, it’s only available on the Subversion repository.Actually, reading the document’s outline using Poppler was easier than what I thought, once I read the PDF reference and I understood enough of it. I also wrote test cases for it and also test cases for displaying it on the application’s main view, as always.

I also fixed the problem that I had with the memory requirements to compile the test suite. It turns out that the compiler would run out of main memory because the test cases were too long. I really need a new development computer, or at least with more RAM :-)

If everything goes right, tomorrow or Monday I’ll release version 0.1.1 of ePDFView, with the outline code and some other “annoyances” fixed.

04.13.06

PDF Viewer released

Posted in Projects, ePDFView at 5:39 pm by Jordi Fita

I’ve released the first version of ePDFView, the lightweight PDF viewer. As this is the first version don’t expect too much for the application. It’s just a viewer, althought you can zoom and rotate the document.There are still a lot of thinks to do for the next version: thumbnails, page index, links, make the backend render the pages faster, render the pages in background… but over all of then I must reduce the memory requirements for compiling the test suite.

I don’t know why but when I compile the test suite the compiler takes out all the free memory and my computer becomes unresponsive (i.e., is swapping all the time.) I really don’t know if it’s a bug of the compiler (possible but not probable), something I don’t know about CppUnit or my MVP implementation (very probable). I’ll find out in the following days, I hope ;-)

04.11.06

Half PDF Viewer

Posted in Projects, ePDFView at 7:17 pm by Jordi Fita

Finally I’ve decided to start working on the lightweight PDF viewer I talked about last sunday.

Sure, it won’t have the same features that other better document viewers, like Evince, but it will only depend on Poppler and GTK+. Although the way I do my GUI application should let change the GTK+ part for any other toolkit (even raw Xlib!) without too many changes to the application.

What I do for my GUI application is follow the Model View Presenter (MVP) model, which is very similar to the Model View Controller (MVC), but the View layer is much thinner in the MVP than in the MVC. In fact the View layer is just a dumb layer that passes all events to the presenter and waits for the presenter to make a decision.

Since the Model is only the current application’s data, it means that all logic is concentrated in the Presenter. It makes a lot easier to test the logic when it’s on a single place and, since the view is so thin, it’s possible to develop almost the whole application using Test Driven Development (TDD).

That’s why I say I have half PDF Viewer: I have coded all application logic inside the Presenter and tested it using CppUnit. It works, but don’t show anything interesting yet, besides the white dots on the black console (unless you are using a GUI front end, in which case green bars appears!).

I plan to spend tomorrow creating the “GTK shell” that will make the PDF’s visible and perhaps Thurday I will release the first version.

04.09.06

Lightweight PDF Viewer

Posted in Projects, ePDFView at 6:29 pm by Jordi Fita

From time to time I need to read a PDF file I downloaded from Internet. Since I’m not using one of the “big” desktop environments like KDE or Gnome, I didn’t have any PDF viewer installed.

I’m running Gentoo on a fairly low end computer (Pentium III 1GHz with 128MiB of RAM) so I installed Fluxbox as my window manager, hoping to go away from the bloat of desktop environments. That means that I’m not an enthusiastic of installing additional libraries just to view PDF: Evince and KPDF aren’t options.

I installed Adobe Acrobat Reader for GNU/Linux but it’s so slooow… that I try to avoid opening PDF files as much as I can because only the program’s loading time gets on my nerves.

Unfortunately I’m unable to find a lightweight PDF viewer that doesn’t require useless, from my point of view, libraries. So, I’ll try to write a simple PDF viewer using GTK+ and Poppler, a PDF library born as a fork of Xpdf.

I already wrote a prototype GTK+ application that using Poppler shows the first page of any PDF file I try. So I don’t think this project is insane or out of my skills. I just need to make it robust and easy to add features (I still can’t figure how to do searches, for example). I’ll see :-)

Next entries »