title: Paperclip 4 vs Paperclip 5 multiple pdf processing
body: <p>User uploads a pdf. Then </p>
  
  <ol>
  <li>pdf is converted to an image</li>
  <li>pdf is data scraped using a processor and saved into a text file</li>
  </ol>
  
  <p>in paperclip 4
  has_attached_file would look like this
  <code>has_attached_file :mls_pdf,  :styles =&gt; { :mls_pdf =&gt; { :format =&gt; 'txt', processors: [:mls_pdf_processor_05_2016],
       }, :small =&gt; ["200x200&gt;", :png] }</code></p>
  
  <p>I've tried multiple ways of getting this to work in paperclip 5 but no matter which way I do it, the original gets saved, the text file gets saved, the smaller image doesn't get saved. I can do #1 and #2 separately but not in one go.</p>
  
  <p>I get the following error:
  <code>Command :: PATH=/usr/local/bin/identify:$PATH; file -b --mime '/tmp/hello20181202-7565-qh0st4txt'
  Command :: PATH=/usr/local/bin/identify:$PATH; identify -format '%wx%h,%[exif:orientation]' '/tmp/c81e728d9d4c2f636f067f89cc14862c20181202-7565-b8144p.pdf[0]' 2&gt;/dev/null
  [paperclip] An error was received while processing: #&lt;Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError&gt;</code></p>
  
  <p>Here's my model</p>
  
  <p><code>Listing.rb</code>
      class Residential::Listing &lt; ActiveRecord::Base
      include Residential::GeneralHelper</p>
  
  <pre><code>attr_accessor :dummy
  
  belongs_to :appraisal, class_name: "Residential::Appraisal"
  has_one :tax, :dependent =&gt; :destroy
  
  accepts_nested_attributes_for :tax, allow_destroy: true
  
  attr_accessor :_destroy
  
  has_attached_file :mls_pdf,  :styles =&gt; { :mls_pdf =&gt; { :format =&gt; 
  'txt', processors: [:mls_pdf_processor_05_2016],
   }, :small =&gt; ["200x200&gt;", :png] }
  
  validates_attachment :mls_pdf, content_type: { content_type: 
  "application/pdf" }
  validates_attachment_file_name :mls_pdf, :matches =&gt; [/pdf\Z/]
  </code></pre>
  
  <p>How can I get both to happen in one go?</p>