Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
addwatermarkfromtext() inacrobat not looping

ok, so I took bits of codes from the internet and managed to get some stuff to work but it only works on the first page and I would like that to be done on every page. I'm sure it's a noob mistake but just haven't found the answer.

The idea is that it writes the filename with a barcode font and the line after the page number, I put it in two different loops to have two different fonts (hoping that it makes sense).

    for (var p = 0; p < this.pageNum; p++);
var cMyText = event.target.documentFileName.replace(/\.pdf$/i,"");
event.target.addWatermarkFromText({
    cText: cMyText,
    nFontSize:10,
    aColor: color.black,
    cFont: "LibreBarcode39Text-Regular",
    nHorizAlign:app.constants.align.left,
    nHorizValue: 36,
    nVertAlign:app.constants.align.top,
    nVertValue: -3,
    nStart: p
})
for (var s=0; s<this.pageNum; s++);
var cMyText = "\nPage " + (s+1) + " of " + numPages;
event.target.addWatermarkFromText({
    cText: cMyText,
    nFontSize:8,
    aColor: color.black,
    nHorizAlign:app.constants.align.left,
    nHorizValue: 36,
    nVertAlign:app.constants.align.top,
    nVertValue: -10,
    nStart: s

})
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!