Wednesday, March 28, 2007

A3 printing problem in Acrobat 8.0 Pro

Just filed a bug report for Adobe Acrobat 8.0 Professional on the Mac:

Steps to reproduce bug:
  1. Open A3-size PDF document in Acrobat 8.0 Pro on Mac OS X 10.4.9 (Intel):
  2. Cmd-D (Document properties) to confirm the setting 'paper source at page size' is enabled (OK).
  3. Have an A3 printer connected. In my case an HP Business Inkjet 2800dtn, connected via Ethernet (TCP/IP).
  4. Cmd-P for print dialog.
  5. Select 'none' for scaling.
  6. Confirm document size, displayed under the small preview is OK (indeed: 296.7 x 419.5 mm)
  7. Select tray that contains A3 paper.
  8. Confirm the paper size is correct (it is not, it says: 209.9 x 297.0 mm)
Expected results:
  • Paper size set to A3.
Updated (April 10): The trick is to set the page size in the print settings dialog (Shift-Cmd-P) to A3 explicitly, every time you start Acrobat.

Open-source iWork

The Mac OS X application suite iWork consists of two programs: Pages and Keynote.

Pages is a simple word processing application that has good looks and is easy to work with, but comes nowhere near Writer or Microsoft Word in terms of features.

Keynote is great presentation software. In my opinion it beats both Impress and Microsoft Powerpoint, hands tied to the back. The shows you can create with it are really impressive and in fact make a good showcase for Mac OS X's graphics capabilities.

However, Pages has quite a few bugs and lacks important features needed for writing larger documents (e.g. cross-references). There are improvements planned for iWork '07, but I doubt it will bring Pages to the feature level I would require for day-to-day text processing.

Both products have limited export features, with various bugs, and lacking OpenDocument support, for example.

Considering the low price of iWork, it seems the application suite is more a showcase for Mac OS X features than a real competitor to Microsoft Office and

However, this may change, if Apple decides to open-source iWork. This may boost the development of iWork, allowing the community to fix bugs and add new features. Like MySQL, Apple could decide to ask money for support. Or they could even choose a license that is free for personal use and non-profit organisations but costs money for commercial organisations. There's all sorts of options.

Apple has experience with the open-source community, since they adapted Konqueror to become WebKit, the engine for their Safari browser. But then again, perhaps this is the reason they won't consider it...

Monday, March 26, 2007

HP Business Inket 2800dtn woes (updated)

I purchased an HP Business Inkjet 2800dtn, expecting to receive a high-quality, Mac-compatible colour printer. Although the printer looks good from the outside, I have quite some issues with it:
  • can't get any A3 prints out using Adobe Acrobat 8.0 Professional; all output is clipped at A4-size;
  • when I select which tray to use in any Mac OS-standard print dialog, all output is mirrored and flipped upside-down (?!);
  • when printing A4 using Acrobat 8, there are margins of about 3 mm on both the left and the right side;
  • all output from NeoOffice (2.0 Aqua Beta 3 Patch 15) is printed in light-gray.
I tried using different drivers, but there only seems to be the Foomatic driver, which is included in Mac OS X 10.4, it's on the HP installation CD and it's the current printer driver according to The HPIJS printer driver doesn't work at all.

Update (April 10, 2007): The trick is to use the network interface only, not the USB interface. Then the Foomatic PostScript drivers work like a charm.

Update (July 2, 2007): The issue with Acrobat was my fault. I did not realize I have to set the paper size manually each time I start Acrobat, using Shift-Cmd-P.

Friday, March 23, 2007

Firebug is great!

Any webdeveloper trying to debug CSS, JavaScript or AJAX should use a good tool like Firebug, a Firefox extension. It works for sure under Firefox 2.0.

One screencast says more than a thousand words:

Tuesday, March 20, 2007

Log colorizing

Do you ever look at log files? A lot? Then, like me, your brains could use a little help to easen the interpretation of all the letters and digits that are scrolling by. This is where a log colorizer helps.

I was looking for a log colorizer tool, but found it hard to find one using Google, until I found this article: Log colorizing on a Dreamhost account. Although it's written for Dreamhost (a US service provider), the article seemed sufficiently generic for use on other *NIX systems (like my Apple).

Note: the PCRE version mentioned in the article is outdated. Just go the the tools' website to check out which version is now the current stable release.

Summarized: All you need is 2 akwardly named tools:
  • PCRE - 'Perl Compatible Regular Expressions'
  • CCZE - a C port of RASZi's colorize.
I thought I might be lucky and tried DarwinPorts to see if that would support CCZE, but it doesn't:
~$ sudo port install ccze
Error: Port ccze not found

For me, PCRE installed like a breeze. But CCZE failed to build:
make -C src all
cc -c -I. -I. -I.. -DPATCHLEVEL=\"1\" -DSYSCONFDIR=\"/Users/ernst/usr//etc\" -D_GNU_SOURCE=1 -DPKGLIBDIR=\"/Users/ernst/usr//lib/ccze\" -DHAVE_SYSTEM_H=1 -DBUILTIN=1 -Wshadow -Wpointer-arith -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wbad-function-cast -Wsign-compare -Wchar-subscripts -Wcomment -Wformat -Wformat-nonliteral -Wformat-security -Wimplicit -Wmain -Wmissing-braces -Wparentheses -Wreturn-type -Wswitch -Wmulticharacter -Wmissing-noreturn -Wmissing-declarations -g -O2 -I/Users/ernst/usr//include ccze.c
cc1: error: unrecognized command line option "-Wmulticharacter"
make[1]: *** [ccze.o] Error 1
make: *** [all-recursive] Error 2

Here's my CC version:
$ cc --version
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

When I resolved the issue by removing the flag from src/Makefile, I got another error:
i686-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
collect2: ld returned 1 exit status
make[1]: *** [] Error 1
make: *** [all-recursive] Error 2

At that point, I gave up on CCZE.

Switching to Tomcat 6.0

For my current project, we extensively use XINS, a light framework for building web services. It comes with all sorts of handy features, including an internal servlet container. However, this internal server is far from being production-quality, so I've come across all sorts of smallish issues. Even the XINS developer, Anthony Goubard, is considering replacing this servlet container in XINS with something like Jetty.

So I've decided to switch to Apache Tomcat, probably the most-used open source servlet container. Apparently the 6.0 branch is considered stable, so I downloaded and installed the 6.0.10 release.

Some issues I encountered with this switch were:
  • it's not obvious how to run Tomcat in the foreground, so I may press Ctrl-C to shut it down;
  • my XSLT parsing suddenly went bananas, with XSLTC complaining about not being able to compile my stylesheet, without indicating the source location - this probably has to do with Saxon (the one I used before) no longer being found or so;
  • when I explicitly specified that Saxon should be used for XSLT processing, a TransformerFactory failed to be instantiated with a NullPointerException;
  • the Tomcat 6 configuration docs are incomplete and slightly confusing.

Friday, March 16, 2007

Mac OS X 10.4.9 update

A few days ago my MacBook Pro asked me whether I'd like to update Mac OS X from 10.4.8 to version 10.4.9. I said 'yes', hoping to see some noticable improvements in speed or stability. However, instead my system seems to have become slightly less stable, actually requiring a reboot today. Several programs crashed.

One other thing I noted is that the quick-shutdown key-combo (Ctrl-Alt-Cmd-Eject) does not work anymore. That is, until I read on a Dutch forum that you need to keep the Eject down for a bit longer. Then it does work.

Perhaps the stability degradation is a clever way to force people into buying Leopard :-)

Wednesday, March 14, 2007

Using NeoOffice

NeoOffice is a free port of for the Mac. I've now been working with it for a few months. The program automatically checks for updates, which most programs seem to do by now. My current version is 2.0 Aqua Beta 3 Patch 15. Don't ask me what that means, exactly. But it's fairly stable.

An alternative to using NeoOffice is using directly on the Mac. This works fairly well, but requires X11 and does not provide an integrated solution. See the for Mac porting project.

Although NeoOffice works pretty stable overall, it's not really integrated in Mac OS X. Menus are inconsistent with other Mac applications, as well as dialogs, keyboard shortcuts, etc. Some examples:
  • after confirming the print dialog (Cmd-P) another dialog is shown, asking for advanced settings;
  • there is a 'Printer Settings' dialog, but it doesn't do anything;
  • default buttons don't have the blue color they have in other applications;
  • buttons are smaller than in other apps;
  • when a file is modified, the red close icon in the window title bar does not change to include a dot;
  • when using Exposé, the dialogs are considered windows in their own right;
  • the list of recent documents is not in the NeoOffice program menu, but in the File menu; so it's impossible to open a recently opened file without having any other file open;
  • it doesn't use standard dialogs, such as the Font dialog;
  • it does not use the standard dictionary and hyphenation support offered by Mac OS X;
  • Cmd-RightArrow goes to the next word instead of the end of the line;
  • etc.
So although the product works quite well, it's far from being a well-integrated Mac OS X application like any of the OmniGroup apps. Perhaps they should consider creating such a beast, although the business model for it may be hard to produce.

At they themselves are also working on an Aqua-port of their product. There was an announcement early February 2007 labeled Mac Porting team announces the top ten items to be fixed before alpha Aqua release. Interesting to know there are apparently some people working on it, but there's not much information available on planning.