title: Print (generate) a code128 barcode (or any image) in millimeters (php)
body: <p>I need to generate labels with <code>code128 barcodes</code> in <code>PHP</code>.
  These will be printed by users with almost any printer.</p>
  
  <p>I have some specific sets of requirements:</p>
  
  <ul>
  <li><p>narrow bar width should be between 0.375mm and 0.5mm</p></li>
  <li><p>maximum overall barcode width: 115mm</p></li>
  <li>first 8 digits must use subset B</li>
  <li>remaining 20 digits must use subset C</li>
  <li>code must be readable at high speeds</li>
  </ul>
  
  <p>I tried several barcode libraries but most of them don't allow stating the minimum bar width in millimeters. You are just able to scale the narrow bar width in fixed integer increments, and 1 is too small and 2 is too big :)</p>
  
  <p>I also tried resampling the image using the gd lib, but the code becomes unreadable at high speeds.</p>
  
  <p>Should I build my own code generator? 
  If so, how would I generate the bars in millimeters?</p>
  
  <p>Thanks in advance</p>