<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4927251939233425669</id><updated>2011-11-05T02:25:57.331-07:00</updated><category term='openoffice kde bug'/><category term='ria'/><category term='offtopic'/><category term='comparison'/><category term='flex'/><title type='text'>Coding Thoughtfully</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-4624489001188281441</id><published>2011-11-05T02:25:00.000-07:00</published><updated>2011-11-05T02:25:57.390-07:00</updated><title type='text'>E-Commerce Sites</title><content type='html'>A few years ago, creating an E-Commerce site would have been a big deal. Technically, you'd probably have started off with Drupal or other website framework, installed it into a web hosting company site, installed a wide range of modules to get product lists, shipping and other features, found and installed a theme, found someone to develop the connection to a payment gateway (or used one of the very few available ones), and then started the fun of testing and debugging.&lt;p&gt;This would have been, if you were efficient, a day or two of effort just for the setup, then on top would be theming and testing, and the costs involved, including probably experienced developers.&lt;p&gt;Now, with providers such as http://www.bigcommerce.com/ and http://www.shopify.com/, this has all gone away and to set up a e-commerce store is, honestly, 5 minutes of work. Even better, these providers integrate with such a wide range of payment gateways, it is unlikely you'd have any need for development. &lt;p&gt;These E-commerce stores are so easy, non-technical people can use them without involving software developers. &lt;p&gt;This is another example of what was once a complex toolset being made available for trivial costs ($25 per month). It provides everybody wanting to sell goods or services online with an extremely low barrier to entry. And I won't even get on to Etsy.&lt;p&gt;I had the opportunity to be involved in depth with the setup of an online store using one of these providers recently. &lt;a href="http://www.wistfulkiwi.co.nz"&gt;Wistful Kiwi's&lt;/a&gt; is a store that sells iconic New Zealand food for delivery overseas (Expats take note!). It was much more enjoyable than delving back into the world of Drupal.(side note, what sort of spelling checker doesn't have the word "Zealand" in it?)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-4624489001188281441?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/4624489001188281441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=4624489001188281441' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/4624489001188281441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/4624489001188281441'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2011/11/e-commerce-sites.html' title='E-Commerce Sites'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-8969682105923994966</id><published>2009-09-21T15:24:00.000-07:00</published><updated>2009-09-21T15:35:41.640-07:00</updated><title type='text'>Flex, IE and URLStream ProgressEvent events.</title><content type='html'>Well, this was good to fix.&lt;br /&gt;&lt;br /&gt;One of the systems I'm working on is a Flex (3) application that for one long running activity needs to update the user on the activity progress. To do this, I use a progress bar, filling from 0 to 100%.&lt;br /&gt;&lt;br /&gt;To update the progress, I first send the # of events, then I send a '.' character from the server to the client for each activity performed on the server side. I only need to send about 100 '.'s so it's only a small amount of data.&lt;br /&gt;&lt;br /&gt;in Flex, I do this using the Flex URLStream() object, like so:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;var loader:URLStream = new URLStream();&lt;br /&gt;var allDataRead:String;&lt;br /&gt;&lt;br /&gt;loader.addEventListener(Event.COMPLETE, function (event:Event) :void {&lt;br /&gt;  // Do completion stuff.&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;var totalEventsExpected : Number = -1;&lt;br /&gt;loader.addEventListener(ProgressEvent.PROGRESS, function (event:ProgressEvent) :void {&lt;br /&gt;  if (loader.bytesAvailable &gt;= 7 &amp;&amp; totalEventsExpected == -1) {&lt;br /&gt;    allDataRead = loader.readUTFBytes(7);&lt;br /&gt;    totalEventsExpected = Number(allDataRead);&lt;br /&gt;  }&lt;br /&gt;  if (totalEventsExpected &gt; 0) {&lt;br /&gt;    popup.progress.setProgress(event.bytesLoaded - 7, totalEventsExpected);&lt;br /&gt;  }&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;var request:URLRequest = new URLRequest(MYURL + "&amp;");&lt;br /&gt;request.data = params;&lt;br /&gt;loader.load(request);&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The object 'popup' is a window with a progress bar which is updated as data comes in.&lt;br /&gt;&lt;br /&gt;This works perfectly under FireFox, but under IE, the progress bar doesn't show any progress. The server side works fine, but the user gets no feedback. I.e. the ProgressEvent does not seem to be fired when data comes in.&lt;br /&gt;&lt;br /&gt;The reason for this is, it appears, that IE buffers the stream data until a certain amount of data is read, then it provides progress events for bytes that come in after that. That is to say, because I was sending only a small amount of data, all data was being buffered by IE and only the completion event was being fired.&lt;br /&gt;&lt;br /&gt;To fix this, and to provide a progressing progress bar under IE, all I had to do was send a bunch of bytes initially to force IE to stop buffering, and provide the progress events. I found that sending 4000 bytes was enough.&lt;br /&gt;&lt;br /&gt;So, if you're in the same situation, just send 4000 bytes initially to get things started.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-8969682105923994966?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/8969682105923994966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=8969682105923994966' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/8969682105923994966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/8969682105923994966'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2009/09/flex-ie-and-urlstream-progressevent.html' title='Flex, IE and URLStream ProgressEvent events.'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-312388310337962102</id><published>2009-03-03T20:52:00.000-08:00</published><updated>2009-03-03T20:59:11.854-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='flex'/><category scheme='http://www.blogger.com/atom/ns#' term='comparison'/><category scheme='http://www.blogger.com/atom/ns#' term='ria'/><title type='text'>RIA Technology Comparison</title><content type='html'>Recently &lt;a href="http://www.nsquaredsoftware.com/doku.php"&gt;for work&lt;/a&gt; I did a quick comparison of RIA technology for a system we're looking at developing. The results can be seen in this &lt;a href="http://spreadsheets.google.com/ccc?key=px3QlXkGtvSYwvMJUl1hCVQ"&gt;Google Spreadsheet&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We ended up choosing to go with Flex + Perl/Apache and a very thin framework. It's quite a nice system to work with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-312388310337962102?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/312388310337962102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=312388310337962102' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/312388310337962102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/312388310337962102'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2009/03/ria-technology-comparison.html' title='RIA Technology Comparison'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-3489149044132186553</id><published>2009-02-09T21:51:00.000-08:00</published><updated>2009-02-09T22:07:00.009-08:00</updated><title type='text'>Solaris, Java, iReport, JasperReports, Oracle and Locales</title><content type='html'>Today at work I spent a lot of time discovering the following fun details about getting JasperReports to display localised text. The reports connect to an Oracle database, and use both Java localisation (via NumberFormat.getInstance() etc) and Oracle localisation ('select to_char(the_date, 'Day Month YY') as date') in creating the reports (using JasperReports v3.1.2).&lt;br /&gt;&lt;br /&gt;The reports get the locale from the environment (well the java equivalent of -Duser.language and -Duser.country) as well. The reports run in a Solaris 10 environment.&lt;br /&gt;&lt;br /&gt;Note that JasperReport PDF output is based on iText.&lt;br /&gt;&lt;br /&gt;I wanted to share this in the hope it helps someone.&lt;br /&gt;&lt;br /&gt;Locales on Solaris:&lt;br /&gt;===================&lt;br /&gt;&lt;br /&gt;In Solaris, to view terminal output in other languages, you need to have installed the right language packs. Ref to:&lt;br /&gt;&lt;br /&gt;http://developers.sun.com/dev/gadc/techtips/sol9_locale_pkgs/index.html&lt;br /&gt;&lt;br /&gt;for lists of the packages you need to install for each language. For Solaris 10 - go here http://developers.sun.com/global/products_platforms/solaris/reference/faqs/Locale_config_S10.txt-s10u5-sparc.txt&lt;br /&gt;&lt;br /&gt;To check whether or not language packs are install, run the command:&lt;br /&gt;&lt;br /&gt;locale -a&lt;br /&gt;&lt;br /&gt;This will print out a list of the locales, and the character encodings available for those locales. e.g:&lt;br /&gt;&lt;br /&gt;$ locale -a&lt;br /&gt;C&lt;br /&gt;POSIX&lt;br /&gt;ar&lt;br /&gt;ar_EG.UTF-8&lt;br /&gt;en_CA&lt;br /&gt;en_CA.ISO8859-1&lt;br /&gt;en_CA.UTF-8&lt;br /&gt;en_US&lt;br /&gt;en_US.ISO8859-1&lt;br /&gt;en_US.ISO8859-15&lt;br /&gt;en_US.ISO8859-15@euro&lt;br /&gt;es&lt;br /&gt;es_MX&lt;br /&gt;es_MX.ISO8859-1&lt;br /&gt;es_MX.UTF-8&lt;br /&gt;fr&lt;br /&gt;fr_CA&lt;br /&gt;fr_CA.ISO8859-1&lt;br /&gt;fr_CA.UTF-8&lt;br /&gt;iso_8859_1&lt;br /&gt;ja&lt;br /&gt;ja_JP.PCK&lt;br /&gt;ja_JP.UTF-8&lt;br /&gt;ja_JP.eucJP&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example output, I have Japanese, French (Canadian), Spanish (Mexican), English (US and Canadian), and Arabic (Egyption).&lt;br /&gt;&lt;br /&gt;The format is location_territory.encoding, with territory and encoding optional. The territory can be important (e.g. there are differences between French and Canadian French), and the encoding is important for getting the data to view properly.&lt;br /&gt;&lt;br /&gt;Assuming you have the relevant locales install, you can then set your language in the following way (in the terminal):&lt;br /&gt;&lt;br /&gt;$ export LANG=ja_JP.UTF-8&lt;br /&gt;$ export LC_ALL=ja_JP.UTF-8&lt;br /&gt;&lt;br /&gt;Then you can try it out, e.g. using the 'date' command:&lt;br /&gt;&lt;br /&gt;$ date&lt;br /&gt;2009Ç¯02·î09Æü (·î) 23»þ30Ê¬33ÉÃ GMT&lt;br /&gt;&lt;br /&gt;Assuming you're able to view UTF-16, you'll notice that in this case, I'm obviously not getting the right characters through. This is because my terminal emulator (kterm in this case) has not been set to the right character encoding, so it is not correctly identifying the characters coming through. In fact, my terminal doesn't have a UTF-8 version of Japanese available as a&lt;br /&gt;character encoding under the Japanese list. I need to use ja_JP.eucJP:&lt;br /&gt;&lt;br /&gt;$ export LANG=ja_JP.eucJP&lt;br /&gt;$ export LC_ALL=ja_JP.eucJP&lt;br /&gt;&lt;br /&gt;I then set my terminal emulator to have the right encoding, and then try the &lt;br /&gt;date command again:&lt;br /&gt;&lt;br /&gt;$ date&lt;br /&gt;2009年02月09日 (月) 23時41分35秒 GMT&lt;br /&gt;&lt;br /&gt;Much better.&lt;br /&gt;&lt;br /&gt;(note that changing my character encoding to UTF-8 for my terminal, and&lt;br /&gt;then changing LANG/LC_ALL back to ja_JP.UTF-8 does work as well).&lt;br /&gt;&lt;br /&gt;Arabic:&lt;br /&gt;&lt;br /&gt;$ export LANG=ar_EG.UTF-8&lt;br /&gt;$ export LC_ALL=ar_EG.UTF-8&lt;br /&gt;$ date&lt;br /&gt;الأثنين,  9 فبراير, 2009&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that not all programs will localise correctly just because you have locales for them. E.g. X11 will need the relevant fonts, and programs will need localisation packs for translating text and other sorts of things to the right language. E.g. going 'man date' still shows the information in English, despite my language being in Arabic. On the other hand, if I set my language to Japanese on my local Linux machine, and run ireport, I get Japanese throughout the &lt;br /&gt;ireport UI.&lt;br /&gt;&lt;br /&gt;The locale approach above is what works for Linux as well.&lt;br /&gt;&lt;br /&gt;For command line Java, the locale is important, as is the terminal character encoding! Though if you redirect to a file, then read the file in a text editor that handles UTF (and has the right fonts to display the language characters) then you can see them properly. All in all the key thing here is that you've got to have the same locale and encoding throughout the whole string &lt;br /&gt;of systems.&lt;br /&gt;&lt;br /&gt;Right, so that's command line stuff under Solaris working.&lt;br /&gt;&lt;br /&gt;PDF Documents and Locales&lt;br /&gt;=========================&lt;br /&gt;&lt;br /&gt;When it comes to PDF documents (i.e. the reports I'm wanting), things get tricky and a bit of a pain. Basically PDF documents can assume only a small list of fonts exist, and  it just so happens that (as far as I can tell) that the available fonts don't have Arabic (for example) available.&lt;br /&gt;&lt;br /&gt;So, reports need to be written to embed a good font within the PDF document. This is not some global thing either - in jasper reports every text field where it is relevant needs to be explicitly altered to use this new font.&lt;br /&gt;&lt;br /&gt;To be more annoying, the right PDF font encoding also needs to be chosen, and this can be different dependant on the locale chosen, though I've found Identity-H works well for all my tests.&lt;br /&gt;&lt;br /&gt;Note that some locales (ones based on, or very close to, the English character set) don't necessarily have this problem.&lt;br /&gt;&lt;br /&gt;So, to make PDF reports generated via iReport work with varying languages, you need to set a bunch of per-field attributes to ensure the right font/font-encoding is available/used  when the PDF is viewed. An example of a field might be:&lt;br /&gt;&lt;br /&gt;&amp;lt;font fontName="Arial" size="24" pdfFontName="Arial.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/&amp;gt;&lt;br /&gt;&lt;br /&gt;So set up each text field in this manner to get the right encoding.&lt;br /&gt;&lt;br /&gt;Oracle and Locales&lt;br /&gt;==================&lt;br /&gt;&lt;br /&gt;Oracle uses the NLS_LANG environment variable to identify the locale when run from the command line. You must set this to match the similar locale you set for LANG and LC_ALL, and of course your terminal must be reading the encoding right.&lt;br /&gt;&lt;br /&gt;Common NLS_LANG values can be found:&lt;br /&gt;&lt;br /&gt;http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm#_Toc110410556&lt;br /&gt;&lt;br /&gt;With the right encoding and right NLS_LANG, you can run sqlplus and get the date that shows up in the right output format:&lt;br /&gt;&lt;br /&gt; $ sqlplus test/test&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.2.0 - Production on الثلاثاء فبراير 10 04:42:37 2009&lt;br /&gt;&lt;br /&gt;(note that Oracle ignores the LANG/LC_ALL variables, and uses NLS_LANG &lt;br /&gt;exclusively)&lt;br /&gt;&lt;br /&gt;BUT, this won't necessarily work when asking Oracle to convert a date for you:&lt;br /&gt;&lt;br /&gt;SQL&gt; select to_Char(sysdate, 'Day "and" Month') from dual;&lt;br /&gt;&lt;br /&gt;TO_CHAR(SYSDATE,'DA&lt;br /&gt;-------------------&lt;br /&gt;???????? and ??????&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Will come up if your database encoding is set to USASCII7:&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$nls_parameters where parameter like '%SET%';&lt;br /&gt;&lt;br /&gt;PARAMETER&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;VALUE&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;NLS_CHARACTERSET&lt;br /&gt;US7ASCII&lt;br /&gt;&lt;br /&gt;NLS_NCHAR_CHARACTERSET&lt;br /&gt;AL16UTF16&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is bad, as you need the value of NLS_CHARACTERSET to be something&lt;br /&gt;other than US7ASCII, e.g:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$nls_parameters where parameter like '%SET%';&lt;br /&gt;&lt;br /&gt;PARAMETER&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;VALUE&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;NLS_CHARACTERSET&lt;br /&gt;AL32UTF8&lt;br /&gt;&lt;br /&gt;NLS_NCHAR_CHARACTERSET&lt;br /&gt;AL16UTF16&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;AL32UTF8 is the latest and best to use, but if your DB is in USASCII7,&lt;br /&gt;you can't go to AL32UTF8, you need to create a new database and export/&lt;br /&gt;import data (You may be able to go to another char set which may&lt;br /&gt;work fine - I don't know).&lt;br /&gt;&lt;br /&gt;The URS database install must be altered to use AL32UTF8, not USASCII7.&lt;br /&gt;&lt;br /&gt;Once you have AL32UTF8, you can ask Oracle to convert dates/times fine:&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;SQL&gt; select to_char(sysdate, 'Day "and" Month') from dual;&lt;br /&gt;&lt;br /&gt;TO_CHAR(SYSDATE,'DAY"AND"MONTH')&lt;br /&gt;-------------------------------------------------------------&lt;br /&gt;الثلاثاء and فبراير&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Conclusions&lt;br /&gt;===========&lt;br /&gt;&lt;br /&gt;What you need to have to make Oracle, JasperReports (iText) PDF output, and Solaris all play nice with internationalisation (i18n) is:&lt;br /&gt;&lt;br /&gt;1/ Install Solaris languages e.g. Arabic (For Egypt), Spanish (Spain) and Japanese.&lt;br /&gt;&lt;br /&gt;2/ Test that with the right LANG and LC_ALL a 'date' command prints out the right date format and names with no ? or other nonsense  chars (with term. emulator using right char encoding as well).&lt;br /&gt;&lt;br /&gt;This step isn't strictly necessary if you're not using the command line at all.&lt;br /&gt;&lt;br /&gt;3/ Build/rebuild the database with a character set of AL32UTF8, and test that with a NLS_LANG set to "ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256"  or "JAPANESE_JAPAN.JA16SJIS" the right string is printed with:&lt;br /&gt;&lt;br /&gt;   select to_char(sysdate, 'Day "and" Month') from dual;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   Note that LANG/LC_ALL are not relevant for Oracle clients if NLS_LANG is set.&lt;br /&gt;&lt;br /&gt;4/ Create and test your jasper reports with:&lt;br /&gt;    a/ Text fields set to use the Arial TTF (e.g. the Microsoft one). Other fonts will work as long as they have the right unicode codepoints defined for your language.&lt;br /&gt;    b/ Text fields set to embed truetype font&lt;br /&gt;    c/ Text fields set to the PDF encoding of "Identity-H"&lt;br /&gt;&lt;br /&gt;   Note that Japanese for example needs another font such as ArialUni.ttf (unicode    Arial). The PDF encoding of Identity-H seems to work for all of them.&lt;br /&gt;&lt;br /&gt;Note that all of this doesn't necessarily mean that a language/country encoding will work - Oracle still needs to support it.&lt;br /&gt;&lt;br /&gt;Note that while Arial.ttf is (as far as I can tell) free to distribute, ArialUni.ttf is not. Arail is also not exactly a beautiful font.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-3489149044132186553?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/3489149044132186553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=3489149044132186553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/3489149044132186553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/3489149044132186553'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2009/02/solaris-java-ireport-jasperreports.html' title='Solaris, Java, iReport, JasperReports, Oracle and Locales'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-8059047219962667324</id><published>2009-01-29T16:24:00.000-08:00</published><updated>2009-01-29T16:32:55.793-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openoffice kde bug'/><title type='text'>OpenOffice + KDE hanging on file open/save dialogs</title><content type='html'>Upgraded to KDE 4.2 today, and also installed the kde/gtk integration packages* (to allow me to chose the GTK theme when choosing the KDE one).&lt;br /&gt;&lt;br /&gt;Anyway, then I found that the file open/save dialog boxes in OpenOffice 3.0 (possibly earlier versions will have the same problem as well) either didn't show up, or when trying to export my document as a pdf, would hang OpenOffice. &lt;br /&gt;&lt;br /&gt;The workaround is to, in OpenOffice go to:&lt;br /&gt;&lt;br /&gt;Tools -&gt; Options -&gt; OpenOffice.org -&gt; General&lt;br /&gt;&lt;br /&gt;And check the "Use OpenOffice.org dialogs"&lt;br /&gt;&lt;br /&gt;http://user.services.openoffice.org/en/forum/viewtopic.php?f=16&amp;t=8705 is the only link on the web where I found any info on this. &lt;br /&gt;&lt;br /&gt;That makes OO work again. Note that I do have openoffice-org-gtk (and -kde) installed as well, as I used to use Gnome. I suspect if I uninstall the GTK one it'll work.... nope that doesn't help.&lt;br /&gt;&lt;br /&gt;[*] I'm not sure if this integration package makes a difference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-8059047219962667324?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/8059047219962667324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=8059047219962667324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/8059047219962667324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/8059047219962667324'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2009/01/openoffice-kde-hanging-on-file-opensave.html' title='OpenOffice + KDE hanging on file open/save dialogs'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-6901039301932918984</id><published>2008-09-24T02:52:00.000-07:00</published><updated>2008-09-29T01:38:15.087-07:00</updated><title type='text'>Accessing DSE Routers</title><content type='html'>An interesting little tidbit of knowledge.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you have a DSE (Dick Smith Electronics) branded router you may be able to access hidden functionality such as &lt;a href="http://en.wikipedia.org/wiki/Iptables"&gt;iptables&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Turn on telnet access on the router and then telnet to the router. Ensure you allow telnet access only from the LAN (not the WAN).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then, once logged in, type '&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sh&lt;/span&gt;' - if you're lucky this'll give you shell access to the router. While the router may not have many commands, you can go:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;cd /bin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;echo *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;to see the commands available. If you're really lucky, you'll have &lt;a href="http://linux.die.net/man/8/iptables"&gt;iptables&lt;/a&gt; available, and with this you can do significantly more than what the web interface is likely to provide.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I used this to great effect to provide IPSec passthrough on a DSE ADSL router that didn't provide the functionality via the UI. Saved over $50 and a trip through the rain.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;$ telnet 192.168.1.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Trying 192.168.1.1...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Connected to 192.168.1.1.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Escape character is '^]'.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;BCM96338 ADSL Router&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Login: admin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Password: &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&gt; sh&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;BusyBox v1.00 (2006.12.21-05:52+0000) Built-in shell (msh)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Enter 'help' for a list of built-in commands.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# cd /bin&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# echo *&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;adsl adslctl atm atmctl brctl busybox cat cfm chmod date ddnsd df dhcpc dhcpd dmesg dnsprobe dumpmem ebtables echo ethctl false iptables kill ln macaddr mkdir mount msh netctl ping pppd ps pvc2684ctl pvc2684d pwd rm sendarp setmem sh snmp sntp sysinfo tftpd true udhcpd upnp&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# iptables --list&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Chain INPUT (policy ACCEPT)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;target     prot opt source               destination         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ACCEPT     icmp --  anywhere             anywhere            icmp echo-request &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ACCEPT     2    --  anywhere             anywhere            &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;DROP       all  --  anywhere             anywhere            &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;Chain FORWARD (policy ACCEPT)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;target     prot opt source               destination         &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ACCEPT     esp  --  anywhere             192.168.1.4           &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;ACCEPT     tcp  --  anywhere             192.168.1.2           tcp dpt:www &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-6901039301932918984?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/6901039301932918984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=6901039301932918984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/6901039301932918984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/6901039301932918984'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2008/09/accessing-dse-routers.html' title='Accessing DSE Routers'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-6915001887286436384</id><published>2008-09-23T02:13:00.001-07:00</published><updated>2008-10-06T01:39:59.672-07:00</updated><title type='text'>Connecting OS X to a Linux CUPS Printer Server</title><content type='html'>Recently I've had to deal with setting up an OS X (10.4) machine to use a Linux CUPS printer queue.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;While not rocket science this did prove to have a simple trick to it. When setting up the printer, follow these steps to ensure that OS X can find the printer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 1: Open Print &amp;amp; Fax (via System Preferences):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_FdYZywLYFes/SNoGtfZ3t3I/AAAAAAAAAAM/7AFmnXu17Lc/s320/print_and_fax.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5249515694247622514" /&gt;&lt;/div&gt;&lt;div&gt;Click the [+] button and use the add printer dialog to add the printer. Choose "Internet Printing Protocol - IPP".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FdYZywLYFes/SNoHp6q9z9I/AAAAAAAAAAc/C-YRq6tn3Bg/s1600-h/add-printer.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_FdYZywLYFes/SNoHp6q9z9I/AAAAAAAAAAc/C-YRq6tn3Bg/s320/add-printer.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5249516732359233490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It is important to note at this stage that while you must type in a valid IP address (or hostname), it is not actually necessary or used for the CUPS IP printer, the relevant fields are the Name and Location fields.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The Name field gives the printer a nice name (which you'll see in print dialog boxes)&lt;/li&gt;&lt;li&gt;The Location field gives the &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;full location&lt;span class="Apple-style-span" style="font-style: italic;"&gt; &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;of the printer and (as far as I can tell) is the &lt;span class="Apple-style-span" style="font-style: italic;"&gt;only&lt;/span&gt; field that is relevant for OS X for finding the CUPS printer. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;To find out the locations of your printer(s), go to the printer server with your web browser, browsing to port 631. (e.g. the base URL may be &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;http://192.168.1.2:63&lt;/span&gt;1, and printers will be listed under &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;http://192.168.1.2:631/printers&lt;/span&gt;):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FdYZywLYFes/SNoKKKQd8CI/AAAAAAAAAAk/EG-UbQxpt9w/s1600-h/cups.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_FdYZywLYFes/SNoKKKQd8CI/AAAAAAAAAAk/EG-UbQxpt9w/s320/cups.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5249519485322129442" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The location of a printer is, essentially, the URL that the printer title on this page links to. For example, in the above screenshot "Brother_HL-2040_series_USB_1" is a link, and it is that link that constitutes the printer location.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, put in the Location field of the add printer dialog the printer URL, without the "http://" bit. For example:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FdYZywLYFes/SNoLHoJKyLI/AAAAAAAAAA0/fLCU9Jzri8M/s1600-h/add-printer-filled-in.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_FdYZywLYFes/SNoLHoJKyLI/AAAAAAAAAA0/fLCU9Jzri8M/s320/add-printer-filled-in.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5249520541316597938" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you can find your printer in the list, then try that. Otherwise using the "Generic PostScript Printer" option seems to work fine.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Add the printer now and you should find you printer now works from OS X.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are still unable to print, try and turn in CUPS debug. On the Linux machine, edit the CUPS configuration file (under Ubuntu this is &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;/etc/cups/cupsd.conf&lt;/span&gt;) and change the log level to debug (e.g.):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# Log general information in error_log - change "info" to "debug" for&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# troubleshooting...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;LogLevel info&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Would go to:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# Log general information in error_log - change "info" to "debug" for&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;# troubleshooting...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;LogLevel debug&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then restart CUPS:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;sudo /etc/init.d/cupsys restart&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then view the CUPS log:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;tail -f /var/log/cups/error_log&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you see an error that looks a bit like this (in particular the "client-error-not-found" bit):&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] cupsdAcceptClient: 8 from 192.168.1.4:631 (IPv4)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] cupsdReadClient: 8 POST / HTTP/1.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] cupsdAuthorize: No authentication data provided.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] Get-Printer-Attributes ipp://192.168.1.2:&lt;/span&gt;6&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;31/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] Get-Printer-Attributes client-error-not-found: The printer or class was not found.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;D [23/Sep/2008:19:50:47 +1200] cupsdProcessIPPRequest: 8 status_code=406 (client-error-not-found)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;If you find this occurring the most likely reason is that the OS X machine doesn't know the special URL of the printer, and is trying the default. When setting up the printer, fill in the "Location" field to point to the printer, including the printer name (as CUPS understands it). For example, if CUPS thinks the printer is called "Brother_HL-2040_series_USB_1" then the location would need to be similar to:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;192.168.1.2:631/printers/Brother_HL-2040_series_USB_1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(with the right IP address and printer name of course). Remember to view the CUPS online page (by going to &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;http://printerserver:631/printers&lt;/span&gt;) to find the name CUPS has given the printer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; Update - 6th Oct 2008&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Recently I had the fun of testing out my notes above as I had to setup the print system again. This second time OS X was able to find the printer immediately with no problem under the Default Browser (this may be because I had subsequently installed the printer drivers from the Brother site). While OS X was able to find the printer though, it was failing to actually print. The cause turned out to be due to the server now giving access. This was finally solved by including the following section in the CUPS printer configuration file:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;Location /printers/HL-2040_series&gt;&lt;br /&gt;  Order Deny,Allow&lt;br /&gt;  Deny From All&lt;br /&gt;  Allow localhost&lt;br /&gt;  Allow 192.168.1.*&lt;br /&gt;  AuthType None&lt;br /&gt;&amp;lt;/Location&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-6915001887286436384?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/6915001887286436384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=6915001887286436384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/6915001887286436384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/6915001887286436384'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2008/09/connecting-os-x-to-linux-cups-printer.html' title='Connecting OS X to a Linux CUPS Printer Server'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FdYZywLYFes/SNoGtfZ3t3I/AAAAAAAAAAM/7AFmnXu17Lc/s72-c/print_and_fax.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4927251939233425669.post-749854998995853531</id><published>2008-08-25T06:18:00.000-07:00</published><updated>2008-08-25T06:39:47.616-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='offtopic'/><title type='text'>What is this?</title><content type='html'>&lt;div&gt;This blog is written by Jamie Love, a long time software developer based in New Zealand.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;This blog is for the thoughts and ideas that come from my personal experiences in software development in New Zealand. The focus is on software development, telecommunications, being an entrepreneur and data visualization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4927251939233425669-749854998995853531?l=codingthoughtfully.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codingthoughtfully.blogspot.com/feeds/749854998995853531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4927251939233425669&amp;postID=749854998995853531' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/749854998995853531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4927251939233425669/posts/default/749854998995853531'/><link rel='alternate' type='text/html' href='http://codingthoughtfully.blogspot.com/2008/08/what-is-this.html' title='What is this?'/><author><name>Jamie Love</name><uri>http://www.blogger.com/profile/07580394480909243561</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
