Answers.Body: <p>Maybe I don't understand the question, but if you can already do the job with SetaPDF-Stamper manually then all it takes is a little PHP code to do it automatically. There literally is no easier solution to your problem as described; to automate it will take custom code, period, and SetPDF-Stamper is the kind of library you would need for that purpose.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-11T04:46:17.270Z
Answers.Text: I never been really into PHP before, only using simple code such as contact form etc. So I'm struggling right now.
Answers.UserDisplayName: Arthz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-11T04:54:36.787Z
Answers.Text: Edit-The library I mentioned works exactly the way I need though I had a hard time trying to understand it. However, I can't help but amazed that no free/commercial software/application have this kind of features. Thanks for answering though, at least now I know that the library is my only option.
Answers.UserDisplayName: Arthz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-11T17:29:13.553Z
Answers.Text: @tomcam Welcome to the site! This answer would be more useful if you gave OP some guidance as to what to do with the PHP code. You don't need to write the code yourself, but it would be helpful if you could point out the relevant objects, methods, or functions for OP.
Answers.UserDisplayName: elixenide
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-11-09T19:10:11.503Z
Answers.LastActivityDate: 2014-11-09T19:10:11.503Z
Answers.UserDisplayName: tomcam
Body: <p>The closest case I came across in this site is this question:
  <a href="https://ebooks.stackexchange.com/questions/534/how-can-i-personalize-each-copy-of-a-pdf-to-add-the-readers-name-or-email-addre">How can I personalize each copy of a PDF to add the reader&#39;s name or email address to each page?</a></p>
  
  <p>However, I need something more advanced which is to add numbers to PDF containing gift vouchers. Here's what I want to do:</p>
  
  <ol>
  <li>Stamp the same PDF document with number, and save it with another filename.</li>
  <li>Each new PDF file will contain different numbers. BUT, all pages in
  1 PDF file contains the same number.</li>
  <li>The numbers will be placed at 12 different locations each page (some
  with different layout e.g text rotation), and repeated for all
  pages; except the last page.</li>
  <li>The last page of the document will be stamped with the same number,
  but only in 9 different positions.</li>
  </ol>
  
  <p>I managed to do the task using a PHP library SetaPDF-Stamper: <a href="http://www.setasign.com/products/setapdf-stamper/details/" rel="nofollow noreferrer">http://www.setasign.com/products/setapdf-stamper/details/</a></p>
  
  <p>But I need something more automatic (and preferably cheaper), since I need to create hundreds of PDFs.</p>
  
  <p>I've been looking into various kind of PDF editor software (Windows applications), but they only support sequential and/or random numbering. While I need the <em>same number</em> to be stamped on the pages.</p>
  
Tags: <pdf>
Title: How to stamp text to PDF, with a twist
UserDisplayName: Arthz
ThreadText: # How to stamp text to PDF, with a twist
  
  (Asked by: username_0 on 2014-11-06)
  
  The closest case I came across in this site is this question:
  [How can I personalize each copy of a PDF to add the reader's name or email address to each page?](https://ebooks.stackexchange.com/questions/534/how-can-i-personalize-each-copy-of-a-pdf-to-add-the-readers-name-or-email-addre)
  
  However, I need something more advanced which is to add numbers to PDF containing gift vouchers. Here's what I want to do:
  
  1. Stamp the same PDF document with number, and save it with another filename.
  2. Each new PDF file will contain different numbers. BUT, all pages in
     1 PDF file contains the same number.
  3. The numbers will be placed at 12 different locations each page (some
     with different layout e.g text rotation), and repeated for all
     pages; except the last page.
  4. The last page of the document will be stamped with the same number,
     but only in 9 different positions.
  
  I managed to do the task using a PHP library SetaPDF-Stamper: <http://www.setasign.com/products/setapdf-stamper/details/>
  
  But I need something more automatic (and preferably cheaper), since I need to create hundreds of PDFs.
  
  I've been looking into various kind of PDF editor software (Windows applications), but they only support sequential and/or random numbering. While I need the *same number* to be stamped on the pages.
  
  **Tags:** pdf
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-11-09. Score: 1
  
  Maybe I don't understand the question, but if you can already do the job with SetaPDF-Stamper manually then all it takes is a little PHP code to do it automatically. There literally is no easier solution to your problem as described; to automate it will take custom code, period, and SetPDF-Stamper is the kind of library you would need for that purpose.
  
  > **Comments:**
  > **username_0**: I never been really into PHP before, only using simple code such as contact form etc. So I'm struggling right now.  
  > **username_0**: Edit-The library I mentioned works exactly the way I need though I had a hard time trying to understand it. However, I can't help but amazed that no free/commercial software/application have this kind of features. Thanks for answering though, at least now I know that the library is my only option.  
  > **username_2**: @username_1 Welcome to the site! This answer would be more useful if you gave OP some guidance as to what to do with the PHP code. You don't need to write the code yourself, but it would be helpful if you could point out the relevant objects, methods, or functions for OP.  
  
  ---
  
  