I scan in most of my mail, and convert the images into multiple page PDF files. This was fine under Linux, and I had a shell script using ImageMagick to do this.
But with moving to the Mac, this wasn't so easy. The original script drove the scanner and that seems to be the sticking point. I've farted about with various Darwin Ports etc of the SANE and TWAIN packages with nothing reliable.
I'm now using Vuescan to drive the scanner, and I've written a Java application that takes a bunch of graphic files and creates a PDF with one image per page. This application is called Image Funnel.
Screenshot here:
As you can see, it allows you to set a number of options for the document, such as author, title, subject and keywords. It also allows you to set different types of encryption and permissions on the document.
Currently I have it packaged as an OS X application and it can be downloaded from here. (NB: it's 1.8MB).
In the next few days (probably weeks due to Christmas) I'm going to set up a project for it on sourceforge.net.
Wednesday, 20 December 2006
Tuesday, 12 December 2006
Samsung ML-4500 Printer on Mac OS X
I have a samsung ml-4500 laser printer that I would like to use from a mac mini running os x 10.4.8 (intel core duo). It was a completely clean install so here is the process to get it working.
Before we start, it’s worth mentioning that the printer uses a Netgear print server, plugged into it’s parallel port so as far as the mac is concerned, it’s a networked printer.
I went to http://www.linuxprinting.org/macosx/samsung-gdi and installed the ESP Ghostscript package and the samsung-gdi-foomatic packages. Even though these are PPC packages, they install and work on intel macs as well.
Having done that, go to System Preferences->Print & Fax and add your printer. I add mine as an IP printer using LDP (because of the Netgear print server).
Set the IP address to the address of the print server and set the queue name to “P1” (this is required by the print server, not the printer). If you have a different queue name, or leave the queue name blank, it will not work.
Give it a name and a location.
Finally set the print driver to “Samsung ML-4500, Foomatic + GDI”. Print and it should work!
Before we start, it’s worth mentioning that the printer uses a Netgear print server, plugged into it’s parallel port so as far as the mac is concerned, it’s a networked printer.
I went to http://www.linuxprinting.org/macosx/samsung-gdi and installed the ESP Ghostscript package and the samsung-gdi-foomatic packages. Even though these are PPC packages, they install and work on intel macs as well.
Having done that, go to System Preferences->Print & Fax and add your printer. I add mine as an IP printer using LDP (because of the Netgear print server).
Set the IP address to the address of the print server and set the queue name to “P1” (this is required by the print server, not the printer). If you have a different queue name, or leave the queue name blank, it will not work.
Give it a name and a location.
Finally set the print driver to “Samsung ML-4500, Foomatic + GDI”. Print and it should work!
J2ME development on OS X
(This was originally written in October. Since then Netbeans have changed their download pages and made the procedure more or less impossible to follow. This is the corrected update.)
It’s nearly the end of 2006 and there still isn’t a packaged J2ME development environment for OS X. The stumbling block appears to be that the emulators include native code, and that the companies developing the emulators are unwilling to port them to another platform, or port them into 100% Java.
Since I don’t have a Windows box, and I can’t be bothered fighting Linux anymore, I tried various hacks to get this working under OS X (Mac Mini, Intel, OS X 10.4.8).
Massive thanks are due to Lukas Hasik and Florian Beer - see references at the end.
Grrr to whoever at NetBeans reorganised the product download pages and removed all the zip file versions of the CLDC mobility pack.
Overview
This uses pre-release builds for NetBeans 6.0 and the NetBeans Mobility Pack. I haven’t encountered any particular problems but it’s fair to say I’m not doing a lot of J2ME development.
The emulator is the popular Mpowerplayer SDK.
Process
1. Download the zip file for the CLDC Mobility Pack from here.
Note that currently you cannot select this file from the NetBeans download page! In fact you can't select any useful version of the CLDC pack from the NetBeans download page.
2. From the NetBeans 6.0 Q-Builds page, download the IDE build for 200609161800_1. Get the Mac OS X installation and un-tar it. You might want to rename the directory something like NBJ2ME.app, since this will include the J2ME development environment.
Change into this directory.
(I've tried using later builds of the IDE but they don't work with this build of the mobility pack.)
3. The mobility pack will have extracted to a directory called "mobility8". Move this directory to "Contents/Resources/NetBeans/mobility8".
Edit the file “Contents/Resources/NetBeans/etc/netbeans.clusters” and add “mobility8” on a new line at the end of the file.
4. Now we need to install the emulator. This also includes the CLDC and MIDP classes (which are not included in the Mobility pack. Go figure.) Download the Mpowerplayer SDK from here and unzip it (the location is not important). The latest version should be fine, I’m using Build 1185.
5. Start NetBeans and go to Tools->Java Platform Manager. Press Add Platform, select Custom Java Micro Edition Platform Emulator and select Next.
6. Set Platform Home to the path to the location you installed Mpowerplayer to. (This will probably end with mpp-sdk.) Platform Name and Device Name are not important, you could set them both to MPP.
7. Set Preverify Command to (Note: this goes all in one line):
"{platformhome}{/}osx{/}preverify{/}preverify" {classpath|-classpath "{classpath}"} -d "{destdir}" "{srcdir}"
8. Set Execution Command to (again one line):
java -jar {platformhome}{/}player.jar {jadurl}
9. Set Debugger Command to (you get the deal):
java -Xdebug -Xrunjdwp:transport={debugtransport},server={debugserver}, suspend={debugsuspend},address={debugaddress} -jar {platformhome}{/}player.jar {jadurl}
10. Press the Next button. All .jar and .zip files belonging to the Mpowerplayer SDK will be listed and if we don’t do anything, will be added to the NetBeans bootstrap class list. We need to remove some otherwise we will be unable to build applications. Remove the following files:
cldc.jar
midp.jar
xcode/template/xcodetemplate.zip
player.jar
protector.jar
tutorial/bin/FirstPowerMIDlet.jar
11. Press Finish.
That’s it! You should now be able to create a new project (category = Mobile, project = Mobile Application) build and run it.
References:
1. Zip distribution of mobility pack (Lukas Hasik)
2. J2ME Development on NetBeans 5.0 in Mac OS X (Florian Beer)
Feedback:
Send your comments to doug redclock net.
It’s nearly the end of 2006 and there still isn’t a packaged J2ME development environment for OS X. The stumbling block appears to be that the emulators include native code, and that the companies developing the emulators are unwilling to port them to another platform, or port them into 100% Java.
Since I don’t have a Windows box, and I can’t be bothered fighting Linux anymore, I tried various hacks to get this working under OS X (Mac Mini, Intel, OS X 10.4.8).
Massive thanks are due to Lukas Hasik and Florian Beer - see references at the end.
Grrr to whoever at NetBeans reorganised the product download pages and removed all the zip file versions of the CLDC mobility pack.
Overview
This uses pre-release builds for NetBeans 6.0 and the NetBeans Mobility Pack. I haven’t encountered any particular problems but it’s fair to say I’m not doing a lot of J2ME development.
The emulator is the popular Mpowerplayer SDK.
Process
1. Download the zip file for the CLDC Mobility Pack from here.
Note that currently you cannot select this file from the NetBeans download page! In fact you can't select any useful version of the CLDC pack from the NetBeans download page.
2. From the NetBeans 6.0 Q-Builds page, download the IDE build for 200609161800_1. Get the Mac OS X installation and un-tar it. You might want to rename the directory something like NBJ2ME.app, since this will include the J2ME development environment.
Change into this directory.
(I've tried using later builds of the IDE but they don't work with this build of the mobility pack.)
3. The mobility pack will have extracted to a directory called "mobility8". Move this directory to "Contents/Resources/NetBeans/mobility8".
Edit the file “Contents/Resources/NetBeans/etc/netbeans.clusters” and add “mobility8” on a new line at the end of the file.
4. Now we need to install the emulator. This also includes the CLDC and MIDP classes (which are not included in the Mobility pack. Go figure.) Download the Mpowerplayer SDK from here and unzip it (the location is not important). The latest version should be fine, I’m using Build 1185.
5. Start NetBeans and go to Tools->Java Platform Manager. Press Add Platform, select Custom Java Micro Edition Platform Emulator and select Next.
6. Set Platform Home to the path to the location you installed Mpowerplayer to. (This will probably end with mpp-sdk.) Platform Name and Device Name are not important, you could set them both to MPP.
7. Set Preverify Command to (Note: this goes all in one line):
"{platformhome}{/}osx{/}preverify{/}preverify" {classpath|-classpath "{classpath}"} -d "{destdir}" "{srcdir}"
8. Set Execution Command to (again one line):
java -jar {platformhome}{/}player.jar {jadurl}
9. Set Debugger Command to (you get the deal):
java -Xdebug -Xrunjdwp:transport={debugtransport},server={debugserver}, suspend={debugsuspend},address={debugaddress} -jar {platformhome}{/}player.jar {jadurl}
10. Press the Next button. All .jar and .zip files belonging to the Mpowerplayer SDK will be listed and if we don’t do anything, will be added to the NetBeans bootstrap class list. We need to remove some otherwise we will be unable to build applications. Remove the following files:
cldc.jar
midp.jar
xcode/template/xcodetemplate.zip
player.jar
protector.jar
tutorial/bin/FirstPowerMIDlet.jar
11. Press Finish.
That’s it! You should now be able to create a new project (category = Mobile, project = Mobile Application) build and run it.
References:
1. Zip distribution of mobility pack (Lukas Hasik)
2. J2ME Development on NetBeans 5.0 in Mac OS X (Florian Beer)
Feedback:
Send your comments to doug
Does the world need another IT blog?
If I ask myself, whether the world needs another blog about IT, I can only answer, probably not, in any normal sense of "need".
And there exists deep down in any bloggers heart, the worry that the whole blogging thing is just a huge exercise in self delusion, which for the most part, is probably true. And also probably true for me.
But I kid myself that from time to time I find things out that other people might want to know, or think of things that other people may possibly find interesting, so at the risk of a huge waste of electrons, here we go.
Cheers,
Doug
And there exists deep down in any bloggers heart, the worry that the whole blogging thing is just a huge exercise in self delusion, which for the most part, is probably true. And also probably true for me.
But I kid myself that from time to time I find things out that other people might want to know, or think of things that other people may possibly find interesting, so at the risk of a huge waste of electrons, here we go.
Cheers,
Doug
Subscribe to:
Posts (Atom)