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

Printing Two Different Types Of Pages

New Here ,
Jan 19, 2021 Jan 19, 2021

Copy link to clipboard

Copied

So you know how when you go to Mailings in MS Word and you go to print an envelope.  When you print that envelope the printer knows to pull from the bypass tray based on the envelope.

 

This cannot be accomplished in code, however, is there a way to set the properties, by page, to print from the correct tray?

 

What I am trying to accomplish is to print the first page normally (8 1/2 x 11) and the second page (a manilla envelope in the bypass tray)

 

Is this possible?

TOPICS
How to , Print and prepress

Views

544

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 20, 2021 Jan 20, 2021

Yes, it's possible. Use this code to tell the printer to select the paper tray based on the page size:

 

var pp = this.getPrintParams();
fv = pp.constants.flagValues;
pp.flags = pp.flags | fv.setPageSize;
this.print(pp);

Votes

Translate

Translate
Community Expert ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Yes, it's possible. Use this code to tell the printer to select the paper tray based on the page size:

 

var pp = this.getPrintParams();
fv = pp.constants.flagValues;
pp.flags = pp.flags | fv.setPageSize;
this.print(pp);

Votes

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
community guidelines
New Here ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

I'm not sure how to modify this and I am not having any luck.  

 

Is there a way to just make the first page print from tray 1 and the second out of tray 2?

Votes

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
community guidelines
Community Expert ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

Using a script? Only if each tray is defined as its own printer.

Votes

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
community guidelines
New Here ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

I'm not sure how I would accomplish that.  I will have to dig into the printer settings and see if there is an option.  Can you give me a completed example of the code above so I can figure out how to change it to match what we are using?

 

Votes

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
community guidelines
Community Expert ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

The code above is complete. It will send each page to the tray that matches its paper size.

Votes

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
community guidelines
New Here ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

Well that would be why my changes were not working.  Do I set this as part of the file itself or attach it to the print button?

Votes

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
community guidelines
Community Expert ,
Feb 17, 2021 Feb 17, 2021

Copy link to clipboard

Copied

As a part of a button.

Votes

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
community guidelines
New Here ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

LATEST

So I finally got the printer vendor to get the printer to pull from Tray 2 for the evidence envelopes as A4.

So utilizing your script, how do I tell page 1 to print 8 1/2 x 11 and Page 2 as A4.

This is what I currently have attached to the print button (I will be removing the app alert but I wanted to show you what was there currently.)

 

if (app.alert("Would you like to print an evidence envelope?",2,2)==4) {
app.alert("THE FIRST PRINT BOX THAT COMES UP IS FOR YOUR EVIDENCE SHEET. IN THE PRINTER PROPERTIES WHERE IT SAYS TRAY SELECTION, THIS SHOULD BE SET TO AUTOMATIC. CLICK PRINT AND YOUR EVIDENCE SHEET WILL PRINT FIRST. THE SECOND PRINT BOX THAT COMES UP IS FOR YOUR EVIDENCE LABEL. GO TO THE PRINTER PROPERTIES AND CHANGE THE TRAY TO BYPASS. MAKE SURE THERE ARE EVIDENCE ENVELOPES IN THE BYPASS TRAY. YOU MUST TUCK THE FLAP INTO THE INSIDE OF THE ENVELOPE AND PLACE THE ENVELOPE FACE DOWN WITH THE TOP OF THE ENVELOPE (THE FLAP) FACING AWAY FROM THE PRINTER.: ...",3);
this.print({nStart: 0, nEnd: 0}); // print page 1
this.print({nStart: 1, nEnd: 1}); // print page 2
} else {
this.print({nStart: 0, nEnd: 0}); // print page 1
}

Votes

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
community guidelines