title: Type 3 fonts conversion
body: <p>I am parsing Type3 glyphs fonts from Pdf to postscript. The input file have inline image with data streams flate decode filter applied.the filter has predictor 15.
  Any body can help how I take the image streams form pdf to postscript. 
   This is how the input stream is given in pdf     </p>
  
  <pre><code>32 0 obj 
      &lt;&lt;
      /Length 342
      &gt;&gt;
      stream
      37 0 4 -52 33 -1 d1
      0.01 0 0 0.01 0 0 concat
      gsave 2900 0 0 -5100 400 -100 concat
      BI
      /IM true
      /W 29
      /H 51
      /BPC 1
      /D[1
      0]
      /F/Fl
      /DP&lt;&lt;/Predictor 15
      /Columns 29&gt;&gt;
      ID xœ=Ì¡
      Â`ÅñÿeÂLÎ¸ n`0&gt;Ù`ñ
      f[¦DŒF_ÁhC1ì%Ä)¶o.¢Ÿ"†ßá†s®àì]^ÏŠÅS³tFËÂÚ3sç'Æi èÐÇ:j‹¹¨åìOTÿ ª•ÉÙÕÅŸ¨‡¹Ó$°ÆÎšWèÁ!¯Cê
      ÷0&amp;f    µtðV ©Ë÷iôíØªÄ~Ø•Œöí&amp;´« +ro#Ê‚ûÏÅùlßG'
      EI gRestore
  
      endstream 
      endobj 
  </code></pre>
  
  <p>And here is what i am trying to write in output in Postscript </p>
  
  <pre><code>/g21 {
  37 0 4 -52 33 -1 setcachedevice
  q
  [0.01 0 0 0.01 0 0] concat
  q
  [2900 0 0 -5100 400 -100] concat
  [ xœ…Ñ±NÃ0à3©p'l` ¢abä*‰'@‚W`KP¡00öQ`d@ ¨CWž€u`‰štj4Ü]@ /ù¤œíÿ| ÂìÊüå7úŠ‰V'‚ª¦zò¡9à*´º
  m1Õ`ñ—íü‹­‡½Gù@ãÝAVxc¥Ž®"6oFÜ¬JHÃB3(æod¾…xFP†o$!v±Ã»·0—gØY÷J$û„`´#zÊ
  Oí¼œÑ¸é`Ê}ü…Ã±.Z¯›cF4\¡*O¤ÑPÒYòî¦/éG‘qÑç¼2&gt;öq&lt;Üœ&lt;
  B˜5‚²¢ºÎ/èqUTUàoÓ9Í”Î Ü‰ä²z ‡S×ÛÙC(PA²š7è­T¾ŽCGÈRaLéåksnˆÃ0z&lt;zø:ž=
  ]
  0
  &lt;&lt;
    /ImageType 1
    /Width 29
    /Height 51
    /ImageMatrix [29 0 0 -51 0 51]
    /BitsPerComponent 1
    /Decode [1 0]
    /DataSource { 2 copy get exch 1 add exch }
      &lt;&lt;/Predictor 15
      /Columns 29 
      &gt;&gt;
      /FlateDecode filter
  &gt;&gt;
  imagemask
  pop pop
  gRestore
  gRestore
  } def
  </code></pre>