<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Echo.2 &#187; iphone</title>
	<atom:link href="http://blogs.infoecho.net/echo/category/hacking/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.infoecho.net/echo</link>
	<description>ping and pong in the ocean of network</description>
	<lastBuildDate>Tue, 27 Mar 2012 05:49:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to save PDF/Images from Mobile Safari to WebDAV compatible iPhone program?</title>
		<link>http://blogs.infoecho.net/echo/2009/06/27/how-to-save-pdfimages-in-directly-lfrom-mobile-safari-to-webdav-compatible-iphone-program/</link>
		<comments>http://blogs.infoecho.net/echo/2009/06/27/how-to-save-pdfimages-in-directly-lfrom-mobile-safari-to-webdav-compatible-iphone-program/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 17:37:43 +0000</pubDate>
		<dc:creator>Jason Chin</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.infoecho.net/echo/2009/06/how-to-save-pdfimages-in-directly-lfrom-mobile-safari-to-webdav-compatible-iphone-program/</guid>
		<description><![CDATA[Unlike most desktop browser, there is no &#8220;download&#8221; option to save an image, a PDF file, etc., from the Mobile Safari so one can read thoses files offline. Well, this is purely a restriction imposed by Apple for security or whatever other stupid reasons. Fortunately, with the most recent update of the operation that support [...]]]></description>
			<content:encoded><![CDATA[<p>Unlike most desktop browser, there is no &#8220;download&#8221; option to save an image, a PDF file, etc., from the Mobile Safari so one can read thoses files offline. Well, this is purely a restriction imposed by Apple for security or whatever other stupid reasons.  Fortunately, with the most recent update of the operation that support cut and paste and some third party WebDAV compatible file viewer, there could have a workaround.</p>
<p>I have recently set up a system such that when I found an interesting URL, I can cut and paste the URL to a widget served from my own host such that it will fetch the resource from the URL, and save it to a location that corresponds to the location of a WebDAV service in my web host account. Then, I can setup the WebDAV compatible file viewer (currently, I am using Air Share Pro) to view the file in my WebDAV direcotry.  Specially, you can also download the files in the WevDAV server locally for future offline reading. This is extreme useful. Once the file is local, you don&#8217;t have to worry if you get wifi, EDGE, or 3G signal, and you might also save some battery power since you don&#8217;t have to reload the files from the network when you read a document on and off.</p>
<p>The main caveat is that you probably need your own web hosting service or iDisk that supports WebDAV. Beside that, you will need to some simple CGI/AJAX programming and spend some money to buy a WebDAV compatible file viewer like Air Share Pro. I won&#8217;t be surprised that one day there will be an iPhone app that implements something like this using a similar idea in a more polished way. Nevertheless, such application is always at Apple&#8217;s mercy. Once Apple opens some policy in the OS allowing sharing data and files between application like an real operation system, all workarounds will be totally useless. Wait, actually, the way I set up getting file to iPhone is not limited for submitting URL from Mobile Safari. Any browser can push the resource from an URL to the WebDAV directory, regradless if an desktop OS supports mounting a WebDAV volumn.  Not bad as an quick method to get some useful document in the Internet from a desktop system to iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infoecho.net/echo/2009/06/27/how-to-save-pdfimages-in-directly-lfrom-mobile-safari-to-webdav-compatible-iphone-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Safari on iPhone to read CHM file</title>
		<link>http://blogs.infoecho.net/echo/2007/09/23/using-safari-on-iphone-to-read-chm-file/</link>
		<comments>http://blogs.infoecho.net/echo/2007/09/23/using-safari-on-iphone-to-read-chm-file/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 01:55:49 +0000</pubDate>
		<dc:creator>Jason Chin</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blogs.infoecho.net/echo/?p=103</guid>
		<description><![CDATA[iPhone is a fancy toy with a lot of power but Apple deliberately locks a lot of the potential power. One thing I like to do on an iPhone is to be able to read CHM files. As a weekend project, I setup the tool chain for iPhone following the instructions. Then, I grabbed the [...]]]></description>
			<content:encoded><![CDATA[<p>iPhone is a fancy toy with a lot of power but Apple deliberately locks a lot of the potential power. One thing I like to do on an iPhone is to be able to read CHM files. As a weekend project, I setup the tool chain for iPhone following <a href="http://code.google.com/p/iphone-dev/wiki/Building">the instructions</a>. Then, I grabbed the source code of <a href="http://www.jedrea.com/chmlib/"><tt>chmlib</tt></a>. With some minor modification, I was able to compile the <tt>chmlib</tt> as an iPhone binary library. That was very encouraging.</p>
<p>This provides a convenient way to make iPhone as a CHM reader. In the <tt>chmlib</tt> source code distribution, there is an example program that runs as a http-server that serves the content of a CHM as standard web page. The &#8220;mobileSafari&#8221; has no problem to render the results, but the fonts are usually too small to read and the text is typically rendered too wide such that a lot horizontal scrolling becomes annoyingly necessary.</p>
<p>I decided to combine some python code with the <tt>chm_http</tt> server from the <tt>chmlib</tt> source code. I modified the source code of <tt>chm_http</tt> so it can call python code to modify the HTML code in the CHM file, replacing the original CSS with new setting for reading on small screen. Furthermore, I found it was tedious to start the <tt>chm_http</tt> from a terminal every time when you want to read a different book. I wrote another small python script that can scan a directory and find all CHM files in the directory to output an index html page. At the end, I was able to use the mobileSafari pointing to the index page and select the book I want to read. The &#8220;chm_http&#8221; server would start automatically to get the book I like to read.</p>
<p>If you are interested in reading CHM on your iPhone. Get this <a href="http://infoecho.net/files/iphoneCHM.tgz">iphoneCHM.tgz</a> <strike>(the file would be upload soon)</strike>. Copy the &#8220;<tt>chm_http2</tt>&#8220;, &#8220;<tt>rewriteHTML.py</tt>&#8220;, and &#8220;<tt>CHMServer</tt>&#8221; to &#8220;<tt>/usr/local/bin/</tt>&#8221; in your iPhone. Change the permission of these files such that you can run all of them. Put some chm files in <tt>/var/root/Media/CHM_Ebooks/</tt>. Open a terminal in the iPhone or ssh into the iPhone to run &#8220;CHMServer&#8221;. After that, ask the Safari to open this URL <tt>http://127.0.0.1:8000</tt>. You should see the links to the CHM files. You can now click on any of them and enjoy a nice reading time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.infoecho.net/echo/2007/09/23/using-safari-on-iphone-to-read-chm-file/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

