Printing Sequential Invoice Numbers

New Here ,
May 25, 2018

Copy link to clipboard

Copied

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

Views

164

Likes

Translate

Translate

Report

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

Printing Sequential Invoice Numbers

New Here ,
May 25, 2018

Copy link to clipboard

Copied

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

Views

165

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 25, 2018 0
Most Valuable Participant ,
May 25, 2018

Copy link to clipboard

Copied

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});

}

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 25, 2018 0
try67 LATEST
Most Valuable Participant ,
May 25, 2018

Copy link to clipboard

Copied

No, you can't.

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 25, 2018 0