Is there a better way of going about this print javascript on fillable form- I hope someone can help

Explorer ,
Jul 22, 2019

Copy link to clipboard

Copied

There must be a better way of doing this, but it's got me- all help appreciated I'm sure.

Back to back printing with a different field on the bottom of the pages

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print Ds COPY

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 2, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 3, nEnd: 3, });

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print POL COPY

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 2, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 3, nEnd: 3, });

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print  SS & AUDIT

getField("Footer").value = "[ SS copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ SS copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ AUDIT copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ AUDIT copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

Adobe Community Professional
Correct answer by Bernd Alheit | Adobe Community Professional

When you use

this.print(pp);

it prints the whole document.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

191

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

Is there a better way of going about this print javascript on fillable form- I hope someone can help

Explorer ,
Jul 22, 2019

Copy link to clipboard

Copied

There must be a better way of doing this, but it's got me- all help appreciated I'm sure.

Back to back printing with a different field on the bottom of the pages

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print Ds COPY

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 2, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ Ds copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 3, nEnd: 3, });

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print POL COPY

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 2, nEnd: 2, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ Judgement Creditor's Solicitor copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 3, nEnd: 3, });

var pp = this.getPrintParams();

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

this.print(pp);

//Print  SS & AUDIT

getField("Footer").value = "[ SS copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ SS copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

getField("Footer").value = "[ AUDIT copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 0, nEnd: 0, });

getField("Footer").value = "[ AUDIT copy ]";

this.print({ bUI: false, bSilent: true, bShrinkToFit: true, nStart: 1, nEnd: 1, });

Adobe Community Professional
Correct answer by Bernd Alheit | Adobe Community Professional

When you use

this.print(pp);

it prints the whole document.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

192

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
Jul 22, 2019 0
Adobe Community Professional ,
Jul 22, 2019

Copy link to clipboard

Copied

Want you print the whole document or seperate pages?

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...
Jul 22, 2019 0
Explorer ,
Jul 23, 2019

Copy link to clipboard

Copied

The whole document would be good

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...
Jul 23, 2019 0
Most Valuable Participant ,
Jul 23, 2019

Copy link to clipboard

Copied

Simply remove the nStart and nEnd parameters from your code, then...

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...
Jul 23, 2019 1
Adobe Community Professional ,
Jul 23, 2019

Copy link to clipboard

Copied

When you use

this.print(pp);

it prints the whole document.

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...
Jul 23, 2019 0