I'd like to write some Perl code to insert 'Bates numbers' into legal documents that are PDF'd. (If you don't know what Bates numbers are, see the Wikipedia entry. See below for quick summary) I'll probably end up using either PDF::API2 or PDF::Reuse. PDF::Reuse has a feature to insert a stamp or water mark, but that is not quite what I want. What I would like to do is shrink the original page by a user-defined amount (zoom=.95 e.g.) and then insert the user-specified Bates Number. The Bates number is typically composed of some ASCII text concatenated with an incremented sequence number per page. (Just assume an arbitrary string for now). My trouble is, aside from poor documentation of PDF::API2, is I don't see a magnify (or zoom) feature for a page. PDF::Reuse does magnify (or shrink, as well as rotate) the watermark or stamp before appying it to a page. I suppose I will end up reverse engineering that for the magnify of PDF, which seems missing as a standalone function...So what I would do is: 1) shrink the PDF page, 2) insert a string at the bottom of the page that does not overlap the existing PDF. 3) Write the page out.

In reply to Bates Number in PDF by emike

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.