With the help of[1] and some glue code[2]:<p><pre><code>  if __name__ == &quot;__main__&quot;:
      import argparse
      parser = argparse.ArgumentParser(
          description=(&quot;Split up pdf from 2-up &quot;
                       &quot;to single page&quot;))
      parser.add_argument(&quot;src&quot;, help=&quot;Source file&quot;)
      parser.add_argument(&quot;dst&quot;, help=&quot;Destination file&quot;)
      args = parser.parse_args()
      split_pages2(args.src, args.dst)
</code></pre>
I produced a PDF[3] that appears to look ok at first glance (bit off on the margins,
perhaps?).<p>[1] <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;13345593&#x2F;split-each-pdf-page-in-two" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;13345593&#x2F;split-each-pdf-p...</a><p>[2] <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;ebe2445416ed8b683d93" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;ebe2445416ed8b683d93</a><p>[3] <a href="https:&#x2F;&#x2F;e12e.github.io&#x2F;files&#x2F;introcyb-split.pdf" rel="nofollow">https:&#x2F;&#x2F;e12e.github.io&#x2F;files&#x2F;introcyb-split.pdf</a>