title: CFScript PDF Merge with Multiple Sources
body: <p>I'm trying to do a PDF merge in CFScript.</p>
  
  <p>So far I have:</p>
  
  <pre><code>pdfService = new pdf();
  pdfService.addParam(source='#source1#');
  pdfService.addParam(source='#source2#');
  writedump(pdfService);
  pdfService.merge(destination="#getTempDirectory()#myfile.pdf";
  </code></pre>
  
  <p>But seems like the addParam is not working.
  When the pdfService is dumped after the addParams, the source is not set.
  What is the correct way of setting it using addParams?
  If there is only one source then it works fine by using </p>
  
  <pre><code>pdfService.addSource(source1);
  </code></pre>
  
  <p>But in the case of multiple sources, the addParam is not working and when it tries to do the merge an error comes up saying that the source is empty.</p>
  
  <p>Note that the source is not a path in the file system, it is a binary PDF object.
  It works fine when I do it in the usual CF way:</p>
  
  <pre><code>&lt;cfpdf action="merge" destination="#getTempDirectory()#myfile.pdf"&gt;
      &lt;cfpdfparam source="source1" /&gt;
      &lt;cfpdfparam source="source2" /&gt;
  &lt;/cfpdf&gt;
  </code></pre>
  
  <p>But I need to get it to work in CFScript.</p>