Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Print to Windows Network Shared Printer problem.

Avatar

Level 1

Hello everyone,

I apologies if anyone has read this under the Acrobat Pro forum but I was told I may get some help on this forum. I  have a problem that I am beating my head up against. In my company we  have some pdf documents that have been created using LiveCycle for our  "go green paperless movement" but we have hit a snag. We have some  "virtual printers" in use with our document management software that  work just as normal networked printers but instead capture an image of  the document being printed and run OCR on our documents for record  keeping. Each pdf document has its own virtual printer to recognize  appropriate OCR templates to use. Therefor we have many virutal pritners  for our many documents. We love our LiveCycle documents but, when  attempting to use javascript to print to a particular network printer we  have found our complication. We do not want to map the printers using  windows or train our employees on adding network printers to their  profile as there are so many and each document is assigned to a virtual  OCR printer, we want the document to have an embedded button that  automatically prints to it's assigned virtual printer.

If I open a document and edit it with Acrobat 9 Pro, I can simply place a button field and add this java code:

var  pp=this.getPrintParams();

pp.interactive=pp.constants.interactionLevel.automatic;

pp.printerName="\\\\TOSHIBABILLING2\\pcl6";

this.print(pp);

and  the system prints to the network printer perfectly. Yet if I use that  same javascript in LiveCycle we get nothing. Further reading I found  some details specifying that I cannot use this same scripting to print  to the network printer using LiveCycle and such am at a loss.

I  have tried open the form in Acrobat 9 Pro to edit it and just add the  button using Acrobat Pro, but each time I edit the document it opens  LiveCycle as the designer.

I  was not sure which forum to use as this problem has been found between  working with both programs. Can someone help me to either modify the  code for LiveCycle, or to at least find a way to open the document in  Acrobat 9 Pro to just add the print button to the LiveCycle form. Any  and all assistance would be greatly appreciated.

~ Max

1 Accepted Solution

Avatar

Correct answer by
Level 10

Soif we simply translated your script that uses the Acroform model to use the xfa model it shoudl work ...right?

Your code in an xfa form woudl look like this:

var oDoc = event.target;

var  pp=oDoc.getPrintParams();

pp.interactive=pp.constants.interactionLevel.automatic;

pp.printerName="\\\\TOSHIBABILLING2\\pcl6";

oDoc.print(pp);

Try that and let us know if it worked.

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Soif we simply translated your script that uses the Acroform model to use the xfa model it shoudl work ...right?

Your code in an xfa form woudl look like this:

var oDoc = event.target;

var  pp=oDoc.getPrintParams();

pp.interactive=pp.constants.interactionLevel.automatic;

pp.printerName="\\\\TOSHIBABILLING2\\pcl6";

oDoc.print(pp);

Try that and let us know if it worked.

Paul

Avatar

Level 1

It worked like a charm. Thank you so much pguerett. I really appreciate it. My headache just went away.