title: add a .pdf file(.png basically) to the end of every page in another .pdf file
body: <p>I have a code.ps file converted to code.pdf , which I want to add to the end of every page in my test.pdf , i.e shrink the test.pdf's every page and add an image to the end of it .</p>
  
  <p>I have written the following shell script to it , but it appends the code.pdf as a new page after every page of test.pdf ! ...Kindly help . Here is my code :-</p>
  
  <pre><code>#!/bin/sh
  filename=test.pdf
  pages="`pdftk $filename dump_data | grep NumberOfPages | cut -d : -f2`"
  numpages=`for ((a=1; a &lt;= $pages; a++)); do echo -n "A$a B1 "; done`
  pdftk A=$filename B=code.pdf cat $numpages output $filename-alternated.pdf
  exit 0
  </code></pre>