TeX-AutoTeX

 view release on metacpan or  search on metacpan

lib/TeX/AutoTeX/StampPDF.pm  view on Meta::CPAN


  if (!(-r $file && ref $stampref eq 'ARRAY')) {
    #FIXME: pod2usage;
    throw TeX::AutoTeX::FatalException "must provide pdf file and stamp contents\n";
  }

  # 6 * 72 - 1/2 * stringlength * 10
  # (10 = approx average char width in 20pt Times-Roman)
  my $yoffset = 432 - 5 * length $stampref->[0];

# minimal arXiv stamp used as a page overlay in grayscale
  my $pdfstamp = <<"EOSTAMP";
q
0.5 G 0.5 g
BT
/arXivStAmP 20 Tf 0 1 -1 0 32 $yoffset Tm
($stampref->[0])Tj
ET
Q
EOSTAMP



( run in 1.046 second using v1.01-cache-2.11-cpan-49f99fa48dc )