Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Printing Sequential Invoice Numbers

New Here ,
May 25, 2018 May 25, 2018

I have a form that I want to print sequential invoice numbers. Example: Invoice Number 601541 prints, then Invoice Number 601542 prints, and so on. I want to be able to just click the amount of copies and have it print like that.  Any javascript suggestions?

TOPICS
Acrobat SDK and JavaScript
525
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2018 May 25, 2018

It's possible, but would require a separate print command for each copy.

Let's say the field is called "Invoice". You run print the file like this 10 times with different values for it in each copy:

for (var i=1; i<=10; i++) {

     this.getField("Invoice").value = Number(this.getField("Invoice").value)+1;

     this.print({bSilent: true});

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2018 May 25, 2018

Separate print command? I can't just type in the number of copies and it print sequential numbers, like in excel?

And where does this code go? under document javascript or document actions?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2018 May 25, 2018
LATEST

No, you can't.

Depends on how you want to execute it. A button or from the JS-console would be the best options.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines