title: Preserve line feeds in scanner input in HTML element
body: <p>I'm using a Zebra DS9908 scanner to scan a bar code and put the data on an HTML page.  What element should I use to preserve all input characters?  I've tried both a <code>&lt;div&gt;</code> and <code>&lt;textarea&gt;</code>, but in both cases the line feed characters between the records in the bard code data are being stripped off.  I've tried &quot;white-space: pre-wrap&quot;, but that has no effect.</p>
  <p>Note, the scanner works via keyboard input.  When I scan the barcode into notepad, it works fine.</p>
  <p><strong>UPDATE1</strong></p>
  <p>The data is driver's license data.  The bar code is PDF417 and the data formats are from AAMVA.  A sample of the data is below.  I don't have any questions on that.  I'm trying to find a way to stream ALL characters to an HTML element, including line feeds.  Line feed are used to separate the fields.</p>
  <pre><code>ANSI 6360100102DL00390183ZF02220047DLDAAJDOE,JOHN
  DAG555 5th St
  DAIMIAMI
  DAJFL
  DAK38451
  DAQH50000000000
  </code></pre>
  <p><strong>UPDATE 2</strong></p>
  <p>Output from Scan123 is below.</p>
  <p><a href="https://i.stack.imgur.com/4GlAF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4GlAF.png" alt="enter image description here" /></a></p>