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

Javascript prints shipping label pdf but wont Auto close using Windows 10

New Here ,
May 09, 2019 May 09, 2019

Copy link to clipboard

Copied

We use JDA/DLX WMS along with Metapack DM to print shipping labels using Internet explorer 11 & Reader 11, we use a JavaScript file to

print then auto close the pdf print window. This all works fine on Windows 7 but the print window wont close using windows 10.

I have tried many variations of the script file without success, the original script is below.

printDocument=app.trustedFunction( function(vPrinterName) {
app.beginPriv();
var pp = this.getPrintParams();
pp.pageHandling = pp.constants.handling.none;
pp.interactive = pp.constants.interactionLevel.silent;
pp.printerName = vPrinterName;
this.print(pp);
app.endPriv();
}
);

Any help would be much appreciated

TOPICS
Acrobat SDK and JavaScript

Views

171

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
community guidelines
Community Expert ,
May 09, 2019 May 09, 2019

Copy link to clipboard

Copied

What do you mean by "close the Print dialog"? A script can't do that. Either you specify not to show it at all (by setting the interactive property to automatic or silent), or the dialog will appear and the user will have to print the file manually.

PS. I moved your question to the JavaScript forum.

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
community guidelines
New Here ,
May 12, 2019 May 12, 2019

Copy link to clipboard

Copied

I don't mean anything by "close the print dialog". I call it a print window co's I'm a dumb Manc .

If you look @ the script it is set to silent & I tried automatic also

Just to clarify, It works in windows 7 but not windows 10

Also add some Rhetoric to my question (unless somebody knows the actual answer) I've tried all the close this close that, true this true that etc etc suggestions without success.

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
community guidelines
LEGEND ,
May 13, 2019 May 13, 2019

Copy link to clipboard

Copied

Please show us what you see, but don’t want to see, in a screen shot. Do NOT try to reply by email with the screen shot, because we won’t see it if you do.

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
community guidelines
Community Expert ,
May 13, 2019 May 13, 2019

Copy link to clipboard

Copied

LATEST

OK, I think I understand now what you mean. This is what the documentation says about this parameter:

Note: (Acrobat 7.0) Non-interactive printing can only be executed during batch, console, and menu

events. Printing is made non-interactive by setting bUI to false when calling the Doc print

method or by setting the interactive property to silent, for example,

var pp = this.getPrintParams();

pp.interactive = pp.constants.interactionLevel.silent;

Outside of batch, console, and menu events, the values of bUI and of interactive are ignored,

and a print dialog box will always be presented.

In other words, in order to do it you have to install a script on the local machine of each user. It can't only be located in the PDF file itself.

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