title: Send Text to a Port Using Javascript
body: <p>I recently got a new printer (specifically a HP Photosmart C6380 if that helps) that allows me to send text to port 9100 to print.  Telnetting into it and typing text to print works fine, but I'm wondering if I could make a webpage using HTML and Javascript that can send text directly to it.</p>
  <p>I'm currently using the code from the article <a href="http://aaron.weaver2.googlepages.com/CrossSitePrinting.pdf" rel="nofollow noreferrer">Cross Site Printing (pdf),</a> but the downside is that when it prints out it shows the entire POST request and not just the text.</p>
  <p>So my question for you is am I able to send just the content of the POST request or strip the unneeded characters using only HTML and Javascript?</p>
  <p>Note: The reason why it's limited to HTML and Javascript is because I'm hoping that I can use this on an iPhone or iPod Touch.</p>
  <p><strong>Edit</strong>:  It appears that there's no way to get rid of the HTTP headers, so now my question is can I craft a custom POST request that will minimize on what is sent in the header? For example, can I not send the user agent since the printer doesn't care what the user agent is?</p>