<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>chlab</title>
	
	<link>http://www.chlab.ch/blog</link>
	<description>Web development and other things</description>
	<lastBuildDate>Fri, 11 May 2012 07:28:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/chlab" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="chlab" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Fancybox IE7 problems</title>
		<link>http://www.chlab.ch/blog/archives/javascript/fancybox-ie7-problems?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fancybox-ie7-problems</link>
		<comments>http://www.chlab.ch/blog/archives/javascript/fancybox-ie7-problems#comments</comments>
		<pubDate>Thu, 29 Mar 2012 09:23:14 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[domready]]></category>
		<category><![CDATA[fancybox]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.chlab.ch/blog/?p=287</guid>
		<description><![CDATA[Recently I used the jQuery extension Fancybox, a Lightbox alternative for jQuery in a project. The web-application had to work in IE7 and I was having some problems that certain page elements were invisible on page-load until you clicked on them. During my search for a solution I found several other people having troubles with [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I used the jQuery extension <a title="Fancybox" href="http://www.fancybox.net/" target="_blank">Fancybox</a>, a Lightbox alternative for jQuery in a project. The web-application had to work in IE7 and I was having some problems that certain page elements were invisible on page-load until you clicked on them. During my search for a solution I found several other people having troubles with IE7 and Fancybox, but no real solution. Here&#8217;s what did the trick for me.</p>
<p>Note: I never got to the bottom of the actual problem, partly because I don&#8217;t really care for the quirks of 6 year old browsers. I imagine it has something to do with Fancyobx inserting elements into the DOM before it is actually completely loaded (Fancybox init&#8217;s itself on-domready).</p>
<p>The fix is a hack for IE</p>
<h3>Part 1</h3>
<p>Somewhere near the bottom of the fancybox.js, there&#8217;s a call to</p>
<pre class="brush: jscript; light: true; title: ; notranslate">$.fancybox.init();</pre>
<p>I changed this to delay Fancybox init until window is fully loaded for IE &lt;= 7:</p>
<pre class="brush: jscript; title: ; notranslate">
// delay fancybox init for old IE versions
if ($.browser.msie &amp;&amp; $.browser.version &lt;= 7) {
  $(window).load(function() {
    $.fancybox.init();
    // set a flag that fancybox is loaded and ready
    window.fancybox_is_ready = true;
  });
}
// the normal case (most browsers)
else {
  $(document).ready(function() {
    $.fancybox.init();
  });
}
</pre>
<h3>Part 2</h3>
<p>Locate where the $.fancybox() function is defined:</p>
<pre class="brush: jscript; light: true; title: ; notranslate">$.fancybox = function(obj) {</pre>
<p>And add this to as the first thing in the function:</p>
<pre class="brush: jscript; title: ; notranslate">
// delay fancybox ondomready registrations to window.load if fancybox
// isn't ready yet
if ($.browser.msie &amp;&amp; $.browser.version &lt;= 7 &amp;&amp; !window.fancybox_is_ready) {
  $(window).load(function() {
    $.fancybox(obj);
  });

  return;
}
</pre>
<h3>Explanation</h3>
<p>In part 1, we delay Fancybox initialization until page is fully loaded, we also set a flag that Fancybox is ready. Part 2 is in case Fancybox is registered to be shown on-domready anywhere, in this case we delay the call until page is loaded if Fancybox isn&#8217;t ready yet.</p>
<p>That&#8217;s about it. Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chlab.ch/blog/archives/javascript/fancybox-ie7-problems/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cache Soap envelope schema for schema validation</title>
		<link>http://www.chlab.ch/blog/archives/php/soap/cache-soap-envelope-schema-schema-validation?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=cache-soap-envelope-schema-schema-validation</link>
		<comments>http://www.chlab.ch/blog/archives/php/soap/cache-soap-envelope-schema-schema-validation#comments</comments>
		<pubDate>Thu, 20 Oct 2011 13:22:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Soap]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[schema validation]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml catalog]]></category>

		<guid isPermaLink="false">http://www.chlab.ch/blog/?p=269</guid>
		<description><![CDATA[I recently had to enable schema validation on incoming requests on a Soap API running on Zend Soap. We were having noticeably worse performance with schema validation than without &#8211; and found out that it was because of the import tag pulling in the Soap envelope schema for every request: My first thought was to [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to enable schema validation on incoming requests on a Soap API running on Zend Soap. We were having noticeably worse performance with schema validation than without &#8211; and found out that it was because of the import tag pulling in the Soap envelope schema for every request:</p>
<pre class="brush: xml; title: ; notranslate">&lt;xsd:import namespace=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; schemaLocation=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;/&gt;</pre>
<p>My first thought was to match all the schemaLocations in the schemas and cache them manually, but it seemed to me there must be a better way..<br />
There is and it&#8217;s called a catalog.</p>
<p>&#8220;What&#8217;s a catalog&#8221; I hear you say:</p>
<blockquote><p>Basically it&#8217;s a lookup mechanism used when an entity (a file or a remote resource) references another entity. The catalog lookup is inserted between the moment the reference is recognized by the software (XML parser, stylesheet processing, or even images referenced for inclusion in a rendering) and the time where loading that resource is actually started.<br />
- <a title="xmlsoft.org" href="http://xmlsoft.org/catalog.html" target="_blank">xmlsoft.org</a></p></blockquote>
<p>So, it turns out libxml has catalog support. A catalog is basically an XML file that libxml will parse and use to map references. I was doing the schema validation with <a title="DomDocument schemaValidate" href="http://php.net/manual/en/domdocument.schemavalidate.php" target="_blank">DomDocument::schemaValidate</a> and since DomDocument uses libxml behind the scenes, this works for PHP as well. libxml2 per default looks for an xml catalog in <em>/etc/xml/catalog</em> and DomDocument is hardwired to that location as well. <strong>*</strong></p>
<p>You can add XML catalogs with a little tool called <em>xmlcatalog</em> that comes with libxml (I think). The usage is pretty straightforward, call up the man page to get an overview or <a title="xmlcatalog man page" href="http://xmlsoft.org/xmlcatalog_man.html" target="_blank">read it online</a>. Here&#8217;s how I added a catalog to map the Soap envelope schema location to a local path:</p>
<p>1. Create <em>/etc/xml</em> if it doesn&#8217;t yet exist.</p>
<p>2. Copy the Soap envelope schema from <a title="Soap envelope schema" href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank">http://schemas.xmlsoap.org/soap/envelope/</a> to a local path, let&#8217;s say /etc/xml/soap-envelope-1.1.xsd</p>
<p>3. Create the catalog file (if it doesn&#8217;t exist yet) and add our new rule:</p>
<pre class="brush: bash; title: ; notranslate">xmlcatalog --create --noout --add &quot;rewriteURI&quot; &quot;http://schemas.xmlsoap.org/soap/envelope/&quot; \
&quot;file:///etc/xml/soap-envelope-1.1.xsd&quot; \
/etc/xml/catalog</pre>
<p>The file created at <em>/etc/xml/catalog</em> should then look something like:</p>
<pre class="brush: xml; title: ; notranslate">&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!DOCTYPE catalog PUBLIC &quot;-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN&quot; &quot;http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd&quot;&gt;
&lt;catalog xmlns=&quot;urn:oasis:names:tc:entity:xmlns:xml:catalog&quot;&gt;
 &lt;rewriteURI uriStartString=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; rewritePrefix=&quot;file:///etc/xml/soap_1.1_envelope.xsd&quot;/&gt;
&lt;/catalog&gt;</pre>
<p>4. Restart apache</p>
<p>Your schema validation should be quick as a flash after that.</p>
<p><strong>*</strong> You can change this default location by setting the</p>
<pre>XML_CATALOG_FILES</pre>
<p>environment variable.</p>
<p>Leave a comment if you have questions or feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chlab.ch/blog/archives/php/soap/cache-soap-envelope-schema-schema-validation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a transparent TabbedBar in Titanium Mobile</title>
		<link>http://www.chlab.ch/blog/archives/mobile-development/create-transparent-tabbedbar-titanium-mobile?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=create-transparent-tabbedbar-titanium-mobile</link>
		<comments>http://www.chlab.ch/blog/archives/mobile-development/create-transparent-tabbedbar-titanium-mobile#comments</comments>
		<pubDate>Tue, 24 May 2011 11:36:00 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Titanium Mobile]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[conrols]]></category>
		<category><![CDATA[tabbedbar]]></category>
		<category><![CDATA[titanium mobile]]></category>
		<category><![CDATA[transparent]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.chlab.ch/blog/?p=228</guid>
		<description><![CDATA[The TabbedBar is often used to choose between one of several content views on one screen. The problem is, the design possibilities are very limited. There&#8217;s no real way to redesign it except set a background color, which doesn&#8217;t look too great. So I figured making it semi-transparent would make it blend in nicely with [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Titanium Mobile TabbedBar" href="http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.TabbedBar-object" target="_blank">TabbedBar</a> is often used to choose between one of several content views on one screen. The problem is, the design possibilities are very limited. There&#8217;s no real way to redesign it except set a background color, which doesn&#8217;t look too great. So I figured making it semi-transparent would make it blend in nicely with the rest of the design. The problem is, you can&#8217;t just set the background color to transparent. There is a way to make it work though.</p>
<p><img class="aligncenter" style="background: none repeat scroll 0 0 #FFF;" src="http://www.chlab.ch/blog/wp-content/uploads/transparent_tabbed_bar3.png" alt="Transparent TabbedBar" align="middle" /></p>
<p>Pretty sweet eh? The solution I used is to make the TabbedBar transparent to the level to which you want it, then create a layer of fully visible Labels over the TabbedBar to create the illusion of a semi-transparent background. I wrote a function for this, feel free to use it if you like:</p>
<pre class="brush: jscript; title: ; notranslate">/**
 * Create a semi transparent TabbedBar
 *
 * The TabbedBar looks best if the backround color is set to one of the colors
 * of the background image of the view beneath it.
 *
 * props:
 * - backgroundColor  string   Background color of TabbedBar
 * - buttonNames      array    Names for the labels of the TabbedBar
 * - height           number   Height of entire view
 * - opacity          decimal  Opacity level of TabbedBar and it's background
 *
 * @param   object  Dictionary of properties
 * @return  object  Titanium View
 */
function createTransparentTabbedBar(props)
{
 if (typeof(props.opacity) == 'undefined')
 props.opacity = 0.4;

 // wraps all the views
 var wrapper = Ti.UI.createView({
 top: 0,
 left: 0,
 right: 0,
 height: (typeof(props.height) != 'undefined' ? props.height : 30)
 }),
 // text overlay container
 overlay = Ti.UI.createView({
 zIndex: 3,
 touchEnabled: false
 }),
 labels = [],
 // bar background layer
 bar_bg = Ti.UI.createView({
 backgroundColor: '#000',
 opacity: props.opacity/2,
 top: 0,
 left: 0,
 right: 0,
 zIndex: 1
 })
 tabbed_bar = Ti.UI.iOS.createTabbedBar({
 backgroundColor: (typeof(props.backgroundColor) != 'undefined' ? props.backgroundColor : '#000'),
 opacity: props.opacity,
 style: Ti.UI.iPhone.SystemButtonStyle.BAR,
 top: 2,
 bottom: 2,
 left: 2,
 right: 2,
 zIndex: 2
 }),
 // button width = screen resolution-2px outer border-right/left margin-1px (border) for every button
 width = Math.ceil((318-tabbed_bar.left-tabbed_bar.right-props.buttonNames.length)/props.buttonNames.length);

 // loop all buttons
 for (var i = 0, l = props.buttonNames.length; i &lt; l; i++)
 {
 // create an empty label for the tab bar
 labels.push('');

 // create a label for the text overlay
 var label = Ti.UI.createLabel({
 text: props.buttonNames[i],
 width: width,
 left: (width*i)+(i*1),
 touchEnabled: false,
 textAlign: 'center',
 color: '#FFF',
 shadowColor: '#000',
 shadowOffset: {x: 0, y: -1},
 font: {
 fontSize: 12,
 fontWeight: 'bold'
 }
 });
 overlay.add(label);
 }

 // add an array of empty labels to create the tabs
 tabbed_bar.labels = labels;

 // wrap everything in one view
 wrapper.add(tabbed_bar, bar_bg, overlay);
 return wrapper;
}</pre>
<p>So we create a View with a background color, put a semi-transparent TabbedBar with empty button names on top of it, then add another layer of fully visible labels spaced to fit the TabbedBar beneath it. Everything is then wrapped in one View, which you can add to another View or Window.</p>
<p>Here is an example how to use it:</p>
<pre class="brush: jscript; light: true; title: ; notranslate">// point the path to the image you want to use
Ti.UI.setBackgroundImage('images/background.jpg');
var win = Ti.UI.createWindow({title: 'Tabbed Bar Test'});

var bar = createTransparentTabbedBar({
 backgroundColor: '#88502B',
 buttonNames: ['One', 'Two', 'Three'],
 height: 40,
 opacity: 0.4
 });
win.add(bar);

win.open();</pre>
<p>Have fun with your transparent TabbedBar!</p>
<p><em>iPhone Screenshot background from <a title="iPhone wood background" href="http://www.iphone4wallpaper.com/patterns/wood" target="_blank">iphone4wallpaper.com</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.chlab.ch/blog/archives/mobile-development/create-transparent-tabbedbar-titanium-mobile/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace (update) a View in a ScrollableView in Titanium Mobile</title>
		<link>http://www.chlab.ch/blog/archives/mobile-development/replace-update-view-scrollableview-titanium-mobile?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=replace-update-view-scrollableview-titanium-mobile</link>
		<comments>http://www.chlab.ch/blog/archives/mobile-development/replace-update-view-scrollableview-titanium-mobile#comments</comments>
		<pubDate>Mon, 16 May 2011 16:07:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Titanium Mobile]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[appcelerator]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[scrollableview]]></category>
		<category><![CDATA[titanium mobile]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.chlab.ch/blog/?p=216</guid>
		<description><![CDATA[This is the first of a (possible) series of posts concerning appcelerator&#8217;s Titanium Mobile. Sometimes you&#8217;ll need to replace one view of a ScrollableView, which, as far as I can tell by the rather incomplete documentation, is not supported out-of-the-box. Don&#8217;t worry, it is possible though and I wrote a function for it: It&#8217;s pretty [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a (possible) series of posts concerning appcelerator&#8217;s <a title="appcelerator Titanium Mobile" href="http://www.appcelerator.com/products/titanium-mobile-application-development/" target="_blank">Titanium Mobile</a>.</p>
<p>Sometimes you&#8217;ll need to replace one view of a <a title="Titanium Mobile ScrollableView" href="http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollableView-object" target="_blank">ScrollableView</a>, which, as far as I can tell by the rather incomplete documentation, is not supported out-of-the-box. Don&#8217;t worry, it is possible though and I wrote a function for it:</p>
<pre class="brush: jscript; title: ; notranslate">/**
 * Replace (update) one view of a ScrollablView with a new one
 *
 * @param   object  The scrollableView
 * @param   object  The old view to be replaced
 * @param   object  The new view to replace the old one
 * @return  void
 */
function replaceView(scrollableView, oldView, newView)
{
  // loop all the views in the scrollable view
  for (var i = 0, newViews = [], l = scrollableView.views.length; i &lt; l; i++)
  {
    // replace the old view with the new one
    if (i == scrollableView.currentPage)
      newViews.push(newView);
    // leave the other views unchanged
    else
      newViews.push(scrollableView.views[i]);
  }

  // update the scrollableView's views array with the new one
  scrollableView.views = newViews;
}</pre>
<p>It&#8217;s pretty straightforward, we loop the existing Views of the ScrollableView and copy each View, replacing the one to be change, to a new array. Then we tell the ScrollableView to use our new Views-array for it&#8217;s Views.<br />
I hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chlab.ch/blog/archives/mobile-development/replace-update-view-scrollableview-titanium-mobile/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Compress PDF files with Quartz filters from command line</title>
		<link>http://www.chlab.ch/blog/archives/mac_os_x/compress-pdf-files-with-quartz-filters-from-shell?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=compress-pdf-files-with-quartz-filters-from-shell</link>
		<comments>http://www.chlab.ch/blog/archives/mac_os_x/compress-pdf-files-with-quartz-filters-from-shell#comments</comments>
		<pubDate>Wed, 07 Apr 2010 14:33:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[automator]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[compress]]></category>
		<category><![CDATA[core graphics]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quartz]]></category>
		<category><![CDATA[quartz filter]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://chlab.ch/blog/?p=7</guid>
		<description><![CDATA[I wanted to use Quartz filters for exporting PDFs from an application I developed at work, preferably from the command line. It seems not that many people have wanted to do this or write about how to do it. After searching google on and off for days and trying all kinds of things, I was pointed in the right direction..]]></description>
			<content:encoded><![CDATA[<h3>What are Quartz filters?</h3>
<p>Quartz is, in a nutshell, a graphic library and part of the OS X Core Graphics Framework. A Quartz <em>filter</em> is basically an XML file defining how Quartz should be used. Quartz filters are often used to compress PDF documents by reducing the size of the images in it &#8211; but can also be used for a variety of other image manipulations.</p>
<p>Here&#8217;s an article about using Quartz filters to reduce the file size of PDFs: <a href="http://www.tuaw.com/2007/12/12/reducing-pdf-file-size-with-a-quartz-filter/">learn how to reduce PDF file size with a Quartz filter</a>. As far as I know, you can create your own filters with the ColorSync program that comes with OS X or by writing the XML yourself. The &#8220;Reduce File Size&#8221; Quartz filter by OS X goes a bit hard on the images, making it useless for print PDFs and even a bit hard on &#8220;screen&#8221; PDFs. A guy named Jerome Colas created a few filters which give you more control over the outcome of the images. Check them out in his article &#8220;<a href="http://discussions.apple.com/thread.jspa?messageID=6109445&amp;tstart=0">Reduce PDF file size : free Acrobat replacement for Leopard</a>&#8220;.</p>
<h3>Using Quartz filters from command line</h3>
<p>I wanted to use Quartz filters for exporting PDFs from an application I developed at work, preferably from the command line. It seems not that many people have wanted to do this or write about how to do it. After searching google on and off for days and trying all kinds of things, I was pointed in the right direction; you can do this with a Quartz printer application stored in /System/Library/Printers/Libraries/quartzfilter. The syntax is:</p>
<pre class="brush: plain; light: true; title: ; notranslate">/System/Library/Printers/Libraries/quartzfilter sourcefile filter destination</pre>
<p>So converting big.pdf into small.pdf with the &#8220;Reduce File Size&#8221; filter would work like this:</p>
<pre class="brush: plain; light: true; title: ; notranslate">/System/Library/Printers/Libraries/quartzfilter big.pdf /System/Library/Filters/Reduce\ File\ Size.qfilter small.pdf</pre>
<p>Pretty straightforward isn&#8217;t it?</p>
<h3>Other ways of using Quartz filters</h3>
<p>While searching, I learned about some other ways to use Quartz filters which may be interesting for some people.</p>
<h4>Using Quartz filters in Python</h4>
<p>On my mac I have the file:<br />
/Developer/Examples/Quartz/Python/filter-pdf.py<br />
I&#8217;m not sure if it came with XCode or if it&#8217;s OS X native. The script can be used to apply Quartz filters to PDF files, except well, it doesn&#8217;t work. If you have an up to date OS X, you should have at least Python 2.5 installed and it looks like the script was developed for Python ≤ 2.3 as it&#8217;s using features from the CoreGraphics library that aren&#8217;t supported in newer versions of Python. I don&#8217;t know the first thing about Python, but I figure if you&#8217;re developing with Python you might be able to fix it.</p>
<h4>Using Quartz filters in Automator</h4>
<p>..is very easy. Create a new Automator project and choose the action &#8220;Apply Quartz Filter to PDF Documents&#8221; from the &#8220;PDFs&#8221; section of the actions library and use it in combination with whatever other Automator action you need.</p>
<h4>Using Quartz filters with AppleScript</h4>
<p>Check this detailed article by Martin Michel over at MacScripter and try the cool droplet he made: <a href="http://macscripter.net/viewtopic.php?id=25916">thoughts and examples about using the quartzfilter tool</a>.</p>
<hr />
That&#8217;s it, I hope some of you can benefit from this post!<br />
Thanks to the guys at <a href="http://forums.macosxhints.com/">macosxhints</a> and <a href="http://macscripter.net/">macscripter</a>.</p>
<p>Note: I tested these things on OS X 10.5.8, I&#8217;m not sure how this will work on other versions of OS X. Please leave a comment if you find out more.<br />
Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chlab.ch/blog/archives/mac_os_x/compress-pdf-files-with-quartz-filters-from-shell/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

