<?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-2302470073807131819</id><updated>2011-07-28T12:53:23.649-07:00</updated><category term='unicode'/><category term='homograph'/><category term='complete waste of time'/><title type='text'>paultheriault</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://paultheriault.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://paultheriault.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Paul</name><uri>http://www.blogger.com/profile/08030808377914210525</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>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2302470073807131819.post-6744393207920724826</id><published>2009-11-10T18:38:00.000-08:00</published><updated>2009-11-10T18:38:27.898-08:00</updated><title type='text'>Visual Studio Error Error</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: left;"&gt;Came across a serious issue in the new Visual Studio Beta today when installing. Someone ought to notify Microsoft to prevent this rarely seen issue, maybe it can be included as a feature?&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_jJQ1I4Bqgh4/SvojH-UKjUI/AAAAAAAACqA/7rzycv8J5P0/s1600-h/ARareProblem.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_jJQ1I4Bqgh4/SvojH-UKjUI/AAAAAAAACqA/7rzycv8J5P0/s320/ARareProblem.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2302470073807131819-6744393207920724826?l=paultheriault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paultheriault.blogspot.com/feeds/6744393207920724826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2302470073807131819&amp;postID=6744393207920724826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/6744393207920724826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/6744393207920724826'/><link rel='alternate' type='text/html' href='http://paultheriault.blogspot.com/2009/11/visual-studio-error-error.html' title='Visual Studio Error Error'/><author><name>Paul</name><uri>http://www.blogger.com/profile/08030808377914210525</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://2.bp.blogspot.com/_jJQ1I4Bqgh4/SvojH-UKjUI/AAAAAAAACqA/7rzycv8J5P0/s72-c/ARareProblem.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2302470073807131819.post-7970231060293678204</id><published>2009-10-19T03:05:00.000-07:00</published><updated>2009-10-19T04:04:55.447-07:00</updated><title type='text'>Dynamic JavaScript Text-To-Speech using Acrobat Reader</title><content type='html'>Adobe Acrobat includes a text-to-speech engine which you can access through the JavaScript functionality built into PDF. However as you can post data between the browser and embedded PDFs, it is possible to use an embedded PDF as a text-to-speech engine to read text aloud, dynamically in the browser. Try it below!&lt;br /&gt;&lt;object data="http://sites.google.com/site/aplacetostorethings/tts.pdf" height="0" id="PdfHost" name="PdfHost" type="application/pdf" width="0"&gt; &lt;/object&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;    &lt;!--  function onPdfMsg(msg) {               alert(msg);          }    function sayIt()  {   var pdf = document.getElementById('PdfHost');   if(pdf==null)    init();   var ta=document.getElementById('text');   pdf.postMessage(["speak",ta.value]);  }      function init(){   var pdf = document.getElementById('PdfHost');   if (!pdf.messageHandler)    pdf.messageHandler = {};   pdf.messageHandler.onMessage = onPdfMsg;     }  setTimeout("init()",1000); function alertObj(obj) {  var children=[];  for(i in obj)  {   children.push(i);  }  alert(children.join('\n')); }    // --&gt;    &lt;/script&gt;&lt;br /&gt;&lt;h3&gt;TTS Example&lt;/h3&gt;&lt;textarea cols="50" id="text" rows="5"&gt;The humans are dead. We used poisonous gasses (With traces of lead). To poison their asses (Actually their lungs).&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;input onclick="sayIt();" type="submit" value="Speak" /&gt;&lt;br /&gt;&lt;br /&gt;How does it work? A combination of&amp;nbsp; JavaScript in the browser and in an embedded PDF. To use this method of your site do the following:&lt;br /&gt;&lt;br /&gt;First you need to embed the pdf :&lt;br /&gt;&lt;blockquote style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;object id="PdfHost" name="PdfHost" type="application/pdf" width="0" height="0" data="http://sites.google.com/site/aplacetostorethings/tts.pdf"&amp;gt;&lt;br /&gt;&amp;lt;/object&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The browser script below initialises the message handler and creates the bridge between the browser and acrobat:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;function sayIt(msg)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var pdf = document.getElementById('PdfHost');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(pdf==null)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;init();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pdf.postMessage(["speak",msg]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;function init(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var pdf = document.getElementById('PdfHost');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (!pdf.messageHandler)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pdf.messageHandler = {};&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;pdf.messageHandler.onMessage = onPdfMsg;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;setTimeout("init()",1000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // --&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;script type="text/javascript"&gt; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;!--&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function onPdfMsg(msg) {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(msg);&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function sayIt()&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var pdf = document.getElementById('PdfHost');&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(pdf==null)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; init();&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var ta=document.getElementById('text');&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pdf.postMessage(["speak",ta.value]);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function init(){&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var pdf = document.getElementById('PdfHost');&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (!pdf.messageHandler)&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pdf.messageHandler = {};&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pdf.messageHandler.onMessage = onPdfMsg;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; setTimeout("init()",1000);&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // --&gt;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; color: rgb(0, 0, 255);"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/script&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;The setTimeout is used to attempt to setup the message handler, which has to happen after the pdf has finished loading. Then you can just call it using script like: &lt;br /&gt;&lt;blockquote style="color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;javascript:sayIt("read this text"); &lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;If you are interested in the source of the PDF, I have posted the JavaScript it contains here: &lt;a href="http://sites.google.com/site/aplacetostorethings/tts.js"&gt;tts.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For this page I used the&lt;a href="http://www.security-labs.org/origami/"&gt; origami framework&lt;/a&gt; to inject the script into valid PDF.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2302470073807131819-7970231060293678204?l=paultheriault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paultheriault.blogspot.com/feeds/7970231060293678204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2302470073807131819&amp;postID=7970231060293678204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/7970231060293678204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/7970231060293678204'/><link rel='alternate' type='text/html' href='http://paultheriault.blogspot.com/2009/10/dynamic-javascript-text-to-speech.html' title='Dynamic JavaScript Text-To-Speech using Acrobat Reader'/><author><name>Paul</name><uri>http://www.blogger.com/profile/08030808377914210525</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-2302470073807131819.post-4369066939142817846</id><published>2009-07-04T18:02:00.001-07:00</published><updated>2009-07-04T18:41:42.386-07:00</updated><title type='text'>Google Chrome and Data URIs</title><content type='html'>Google Chrome's data URIs appear to work with plug-ins like acrobat (which isn't the case in Firefox). This allows you to do silly things like below:&lt;br /&gt;&lt;br /&gt;&lt;a href="javascript:document.documentElement.innerHTML%3D%27%3Cobject%20width%3D1%20height%3D1%20data%3D%22data%3Aapplication/pdf%3Bbase64%2CJVBERi0xLjEKMSAwIG9iago8PAoJL1BhZ2VzIDIgMCBSCgkvVHlwZSAvQ2F0YWxvZwoJL09wZW5BY3Rpb24gPDwKCQkvSlMgNSAwIFIKCQkvUyAvSmF2YVNjcmlwdAoJPj4KPj4KZW5kb2JqCjIgMCBvYmoKPDwKCS9UeXBlIC9QYWdlcwoJL0tpZHMgWyAzIDAgUiBdCgkvQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAoJL1Jlc291cmNlcyA8PAoJCS9Gb250IDw8CgkJCS9GMSA0IDAgUgoJCT4+Cgk+PgoJL1R5cGUgL1BhZ2UKCS9NZWRpYUJveCBbIDAgMCA3OTUgODQyIF0KCS9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKCS9OYW1lIC9GMQoJL1R5cGUgL0ZvbnQKCS9TdWJ0eXBlIC9UeXBlMQoJL0Jhc2VGb250IC9IZWx2ZXRpY2EKPj4KZW5kb2JqCjUgMCBvYmoKPDwKCS9MZW5ndGggNTAKCS9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+c3RyZWFtCnjaKykp1ivILEnOsDWwLgGyC0NSK0o0lIpLEnMUcvLL81JTlDTBEkCBbA1NawCrqxDXCmVuZHN0cmVhbQplbmRvYmoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmCjAwMDAwMDAwMTAgMDAwMDAgbgowMDAwMDAwMTIwIDAwMDAwIG4KMDAwMDAwMDE4OSAwMDAwMCBuCjAwMDAwMDAzMjUgMDAwMDAgbgowMDAwMDAwNDE3IDAwMDAwIG4KdHJhaWxlcgo8PAoJL1Jvb3QgMSAwIFIKCS9TaXplIDYKPj4Kc3RhcnR4cmVmCjU0NwolJUVPRgo%3D%22%20type%3D%22application/pdf%22/%3E%27%3B"&gt;STALLOWNED&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(Requires chrome, acrobat 7+ and speakers :)&lt;br /&gt;&lt;br /&gt;Under the hood, this is a JavaScript URI, which has a small script which replaces the document body with the following:&lt;br /&gt;&lt;br /&gt;&amp;lt;object width="1" height="1" data="data:application/pdf;base64,JVBERi0xLjEKMSAwIG9iago8PAoJL1BhZ2VzIDIgMCBSCgkvVHlwZSAvQ2F0YWxvZwoJL09wZW5BY3Rpb24gPDwKCQkvSlMgNSAwIFIKCQkvUyAvSmF2YVNjcmlwdAoJPj4KPj4KZW5kb2JqCjIgMCBvYmoKPDwKCS9UeXBlIC9QYWdlcwoJL0tpZHMgWyAzIDAgUiBdCgkvQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAoJL1Jlc291cmNlcyA8PAoJCS9Gb250IDw8CgkJCS9GMSA0IDAgUgoJCT4+Cgk+PgoJL1R5cGUgL1BhZ2UKCS9NZWRpYUJveCBbIDAgMCA3OTUgODQyIF0KCS9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKCS9OYW1lIC9GMQoJL1R5cGUgL0ZvbnQKCS9TdWJ0eXBlIC9UeXBlMQoJL0Jhc2VGb250IC9IZWx2ZXRpY2EKPj4KZW5kb2JqCjUgMCBvYmoKPDwKCS9MZW5ndGggNTAKCS9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+c3RyZWFtCnjaKykp1ivILEnOsDWwLgGyC0NSK0o0lIpLEnMUcvLL81JTlDTBEkCBbA1NawCrqxDXCmVuZHN0cmVhbQplbmRvYmoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmCjAwMDAwMDAwMTAgMDAwMDAgbgowMDAwMDAwMTIwIDAwMDAwIG4KMDAwMDAwMDE4OSAwMDAwMCBuCjAwMDAwMDAzMjUgMDAwMDAgbgowMDAwMDAwNDE3IDAwMDAwIG4KdHJhaWxlcgo8PAoJL1Jvb3QgMSAwIFIKCS9TaXplIDYKPj4Kc3RhcnR4cmVmCjU0NwolJUVPRgo=" type="application/pdf"&amp;gt;&lt;br /&gt;&lt;br /&gt;The enocded blob above is a base64 encoded PDF, that in in turn contains JavaScript to call the acrobat text-to-speech API.&lt;br /&gt;&lt;br /&gt;P.S. For anyone interested in acrobat hacking, I'd strongly recommend a look at the &lt;a href="http://www.security-labs.org/origami/"&gt;"Origami"&lt;/a&gt; framework, created by Guillaume Delugré &amp;amp; Fred Raynal.  This ruby based tool provides an open-source tool to construct, manipulate and analyse PDF documents.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2302470073807131819-4369066939142817846?l=paultheriault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paultheriault.blogspot.com/feeds/4369066939142817846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2302470073807131819&amp;postID=4369066939142817846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/4369066939142817846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/4369066939142817846'/><link rel='alternate' type='text/html' href='http://paultheriault.blogspot.com/2009/07/google-chrome-and-data-uris.html' title='Google Chrome and Data URIs'/><author><name>Paul</name><uri>http://www.blogger.com/profile/08030808377914210525</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-2302470073807131819.post-916624715164926603</id><published>2009-04-25T23:32:00.000-07:00</published><updated>2009-10-19T01:19:49.257-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='complete waste of time'/><category scheme='http://www.blogger.com/atom/ns#' term='homograph'/><category scheme='http://www.blogger.com/atom/ns#' term='unicode'/><title type='text'>Internationalized Domain Names</title><content type='html'>Internationalized Domain Names (IDNs) are converted into punycode in most browsers by default, although it depends somewhat on the TLD. (For example, firefox will show the punycode domain name for all TLDs except those specified &lt;a href="http://www.mozilla.org/projects/security/tld-idn-policy-list.html"&gt;here&lt;/a&gt;.)  In the quest for the domain-name-to-rule-them-all, I have been searching for domains that are readable in both &lt;a href="http://en.wikipedia.org/wiki/Unicode"&gt;unicode &lt;/a&gt;and &lt;a href="http://en.wikipedia.org/wiki/Punycode"&gt;punycode&lt;/a&gt;. For example,  &lt;a href="http://ωaψward.gr/"&gt;http://ωaψward.gr/&lt;/a&gt; converts to http://xn--award-beef.gr. Pretty much a waste of time, but there are a few interesting side-effects that I noticed.&lt;br /&gt;&lt;br /&gt;To start with, I started playing around manually, using a simple conversion app I wrote in Java, using the &lt;a href="http://java.sun.com/javase/6/docs/api/java/net/IDN.html"&gt;IDN&lt;/a&gt; class.  After a few minutes playing around it was fairly clear that it was never going to happen with this approach.  Generating unicode URLs using two valid english words - i.e. xn--apple-banana -  was a faster approach. It still involved far too much effort, but introducing a few filters helped to cull out urls that are obviously not words. Some of the more interesting ones were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;http://www.ωaψward.gr --&gt; http://xn--award-beef.gr&lt;/li&gt;&lt;li&gt;кill.gr  --&gt;   xn--ill-bed.gr &lt;/li&gt;&lt;li&gt;ႦႲႶႻႸႽ.org --&gt; xn--endymion.org  (endyion is SO a word)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;汤.cn --&gt; xn--ftw   (汤,  means soup in chinese, and soup is clearly ftw)&lt;/li&gt;&lt;/ul&gt;Then there were a few weird ones which deserve special mention:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;f̹ace̸̸bo̸ok.com--&gt; xn--facebook-deface.com (facebook defaced, get it?)&lt;/li&gt;&lt;li&gt;̱yahoo.cn --&gt;  xn--yahoo-end.cn ( Yahoo ended by homograph attack!)&lt;/li&gt;&lt;/ul&gt;As it turns out however, the man blocks you making up cool domain names, with bourgeoisneo-capitalist rules. The main restrictions are IDNA (RFC 3490) &amp;amp; NAMEPREP (RFC 3491) which prohibit a lot of the unicode goodness. All a bit TLDR but basically it means "Bad luck Ghengis Botherder, no MONGOLIAN VOWEL SEPARATOR for you".&lt;br /&gt;&lt;br /&gt;I tried registering http://www.ωaψward.gr on greek registrars since it doesn't mix unicode from different languages, but I was thwarted, mainly by my complete lack of greek &amp;amp; verified by visa completely failing. (wtf is that shit anyway...srsly) If anyone more clueful than me can shed some light on unicode domain rules that would be cool (Yes &lt;a href="http://www.lookout.net/"&gt;Chris Weber&lt;/a&gt;, I am talking to you.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2302470073807131819-916624715164926603?l=paultheriault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://paultheriault.blogspot.com/feeds/916624715164926603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2302470073807131819&amp;postID=916624715164926603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/916624715164926603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2302470073807131819/posts/default/916624715164926603'/><link rel='alternate' type='text/html' href='http://paultheriault.blogspot.com/2009/04/internationalized-domain-names.html' title='Internationalized Domain Names'/><author><name>Paul</name><uri>http://www.blogger.com/profile/08030808377914210525</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></feed>
