title: Auto width images in columns using pdfmake.js
body: <p>I'm trying to create a simple 2-up image layout, so each image is 50% page width in two columns, however the 'auto' or '*' widths don't seem to work with images. </p>
  
  <p>Is there any way to achieve this without setting explicit widths for the images? </p>
  
  <p>Or if not, is it possible to get the width of the page so I can do the math myself?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>A simplified version of the code I've tried is:</p>
  
  <pre><code>var dd = {
  content: [
      {
          columns: [
              {
                  image: 'sampleImage.jpg',
                  width: 'auto'
              },
              {
                  image: 'sampleImage.jpg',
                  width: '*'
              }
          ]
      }
  ]
  }
  </code></pre>
  
  <p>Using those auto widths I just get <code>Uncaught Error: unsupported number: NaN</code> in the console. If I change them to fixed widths, however, they work fine.</p>