Printing PDFs

I’ve just had an interesting object lesson in the differences between two different pieces of software that have more than essentially the same function.

Today I had an important PDF document to print out at home instead of at the office. For the purposes of practical convenience, it was far better to print it out at home and just deliver it to the office than spend the extra time at the office (5-10 minutes) turning on my office computer and printing it out there on a printer I knew would have no difficulty dealing with it, having printed out a few dozen identically-generated documents on it.

On my pretty much stock Fedora 10 box, I use the Evince Document Viewer 2.24.2 using poppler 0.8.7 (cairo) for the Gnome desktop to display and print PDF documents. So far, I’ve been satisfied.

The PDF’s layout had margins beyond my printer’s abilities. And of course the most important parts of the document, being right at the edges of the margins in this document, were being cut off in the process of printing out the document. A reduction in the print size was not useful since the vital information was on the end of the document being cut off in the margins. I suppose I could have tried rotating the document to try to see if the cut off part would not contain crucial information, which I didn’t think of at the time. Both these strategies, however, miss the point: If the original document has very narrow margins, something is going to get cut off no matter what; not exactly desireable.

I did try something that happened to involve a Windows box (ughh) mostly because it had a different printer, and you never know how things behave differently with different equipment.

Not surprisingly, the windows box happens to have an Adobe viewer installed (I avoid that box as much as possible; I don’t even maintain it, that’s my brother’s job. 🙂 ). I click to print the document and whaddya know, in the print dialog there’s an option to fit the document within the printable area. Document printed, convenience secured.

Now what I would like to know is how much of the print window in my desktop is governed by HPLIP, how much by Gnome, how much by CUPS, and how much by the application invoking it at the moment. So I did a little experiment: Always selecting my printer, I opened a print dialogue in Evince Document Viewer, OpenOffice.org (3.0.1), Firefox (3.0.7), The Gimp (2.6.5), Xpdf (3.02) which I intentionally installed for the purpose of this experiment, and gedit (2.24.3) (on which I’m composing this blog). Besides Xpdf, each appears to have the same base, and except for Evince Document Viewer, each also adds a function tab of its own. Xpdf, on the other hand, has its own stripped-down interface — either invoke the lpr command or print to a file.

Here’s a quick table listing the tabs listed in the print dialogs available in five, off-the-shelf standard installs of Fedora 10 software, with my printer selected, plus Xpdf, which was installed directly from the Fedora repositories without any modification of settings or whatever on my part:

OpenOffice.org*: General; Page Setup; Job; Advanced; Properties
Firefox: General: Page Setup; Job; Advanced; Options; Properties
Document Viewer: General; Page Setup; Job; Advanced
The Gimp**: General; Page Setup; Job; Advanced; Image Settings***
Xpdf: Xpdf has its own stripped-down interface
gedit : General; Page Setup; Job; Advanced; Text Editor

* There is an Options button in the “Page Setup” tab for OpenOffice.org.
** The Gimp treats my “special” PDF as an image much like any other, and automatically sizes it to the current settings, much like it would handle a .png or .jpg image
*** The Gimp has an option to ignore the margins; see above note

Not one, besides The Gimp, has an option to fit the document within the printable range, and The Gimp only indirectly, because of the way it seems to handle PDFs by default as an image to be manipulated. And of the others, to be fair, only Document Viewer and Xpdf deal with PDFs — even FireFox delegates PDFs to the Evince Document Viewer by default.

Then I did another little experiment: I installed Adobe Reader 9.1 (that license is interesting, pretty convoluted, and makes me wonder whether I may use the installation at all; in any case, I’ll be getting rid of it since I really only installed it for the purpose of this experiment, and decided a while ago that having 2 PDF viewers above and beyond that which is available in the basic distro installation is superfluous unless ther’s a particular reason for it.) And what do I see? A new print dialog that reminds me of the one I saw earlier on the windows box. Interestingly, it has “fit to printable area” and “shrink to printable area” options.

So my little experiment has led me to the following conclusions:

– many pieces of software, presumably not wanting to reinvent the wheel, rely either on the OS or I suspect, at least in this case, the desktop environment for its print dialogs;
– some software authors do want to reinvent the wheel, such as to “do it their own way”, or to be completely platform and environment independent, and therefore make their own dialogs;
– some software authors want to do extra things but don’t want to reinvent the wheel, so they have a wrapper for to add extra functionality to an existing base;
– in my documents, I shouldn’t try to stuff as much content as possible into each page too far, at least not by playing around with the margins.

Looks like something for the Evince authors to toss in. Assuming, of course, that — without fundamentally changing a document — resizing a PDF and/or its content to the local printer’s printing range is a really useful feature, such as to deal with awry margins, or PDFs sized for A4 instead of letter sized or vice-versa. 🙂 And that such non-conformities and/or their prevalence make it worth my using the Adobe Reader, licensing issues aside. Or that another PDF reader out there that has that functionality.

Hmmm … OO.o differences, Fedora, and Ubuntu

In my post I may just have that reason to get rid of Ubuntu I whined about minor differences between “stock” OpenOffice.org appearances and functions and those I used straight off the OO.o website as well as what ships with Fedora.

This blog (here’s my archive) explains a bit why: It says “Many Linux distributions ship ooo-build. … Fedora ships a modified OpenOffice.org, but Fedora does not use ooo-build.” Which means that in keeping with Fedora’s usual policy, it ships upstream versions of software with only reasonably required modifications to make it work under Fedora. When I was using CentOS, I was using the vanilla version directly from OO.o.

That explains a few things. It doesn’t necessarily justify my whining — nor all the changes Ubuntu or other distros (or even Fedora) make, but … Why mess with a good thing? 🙂

Vino-server appears to have struck again!

Back a couple of years ago, my CentOS-4.6 system was slowing down to near unuseability. Using the Top command at a command line, there seemed to be this service listed at the top called Vino taking up a good amount of resources. My brother looked at it, researched it, and set up an hourly cron job to kill the vino-server every hour, and the problem was solved.

Back last fall, I was getting this notion, while running Ubuntu 8.04 LTS, that the system had slowed down a bit much the same way that Windows 2000 is a little slower than Win98. When I switched back to Fedora 10, I noticed the same thing. However, I never noticed a return of the infamous vino-server.

Then last week I figure it’s time to get more memory and decided to pull out my 512meg memory stick and go with it, for comparative purposes to make sure I get the right thing, to the store to get a twin for it, or a 1gig stick, in the hopes that either a gig or a 1.5 gigs would improve performance. I’m cheap and was pleased to pick up what appeared to be a nearly-new, opened box of 1gig of SDR2 667mhz for $5.

Well, I guess those of you who actually know what to do around an open computer are chuckling by now and know that my new purchase doesn’t fit in my DDR slots, the little slot in the DDR2 stick being about a millimetre or two over from the same slot in DDR memory sticks.

In the meantime I of course put my original memory stick back and notice over the past week that my computer is becoming increasingly bogged down to unuseability. During the week I found a website that seemed to make my computer freeze, but others didn’t. Today I mention the general slowness that the computer has bogged down to to my brother who looks at things and he has a flash of memory. A quick hourly cron job is set up to kill vino-server, and my computer works fine again.

It’s an Ubuntu World After All …

So last night I went to a Linux Meetup up here in the Wonderful City of Montreal, my hometown. I have my laptop up and running. Another participant walks up to it, notices the stylized “F” in the upper left-hand corner of my gnome desktop beside the “Applications” pull-down menu, and says “Ooooo, that’s different …”

The person using my laptop matter-of-factly responds, “Well sure, it’s Fedora” and continues with what he’s doing. I enjoyed that.

(Curiously, at the same time, I wonder what was going through his head as he switched the default keyboard over to US-English. Montreal is a predominantly French-speaking city, the second-largest French speaking city after Paris, in fact; I’m a native-English speaker, operating my computer in English, using a Canadian-French keyboard; he, a native-French speaker, obviously preferring the US-English layout.)

At a previous such meeting, I found it refreshing to observe two people on opposite sides of an heated discussion: One, annoyed that “When people think of Linux they think of Ubuntu” and argues how the wonderful thing about Linux is the diversity and choice, how everyone can drive the colour of car they wish, and it doesn’t have to be black. The other is arguing not so much in favour of Ubuntu per se, but the notion that if one distro is strong enough and helps move the Linux cause forward, so be it, it’s a good thing.