Planet PDF Forum Planet PDF Forum
  New Posts New Posts RSS Feed - Print thru PrintParams
  FAQ FAQ  Forum Search   Register Register  Login Login

Hi, welcome to the Foxit Planet PDF Forum. If you have PDF or Adobe Acrobat questions then the right place to ask them is here, in this forum.

Print thru PrintParams

 Post Reply Post Reply
Author
NetMan View Drop Down
New Member
New Member


Joined: 21 Jan 2014
Points: 1
Post Options Post Options   Quote NetMan Quote  Post ReplyReply Direct Link To This Post Topic: Print thru PrintParams
    Posted: 21 Jan 2014 at 11:01am
Hello everybody.
I need to print first page into the file. I have trusted function:

pPrint = app.trustedFunction( function(this,pp)
{
app.beginPriv();
try
{
var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.silent;
pp.firstPage = 0;
pp.lastPage = 0;
pp.fileName = "/c/temp/temp.pdf";
pp.printerName = "Adobe PDF";
this.print(pp);
}
catch(e)
{
        app.alert("Error Trusted Function");
}
app.endPriv();
}
);

and code for the button:

if(typeof(pPrint) == "function")
{
    var pp = this.getPrintParams();
    pp.interactive = pp.constants.interactionLevel.silent;
    pp.firstPage = 0;
    pp.lastPage = 0;
    pp.fileName = "/c/temp/temp.pdf";
    pp.printerName = "Adobe PDF";
    pPrint(pp);
}
else
{
app.alert("Error Button");
}

but it not work with error for buttons code:

SyntaxError: missing formal parameter
28:Folder-Level:App:Config.jsAcrobat EScript Built-in Functions Version 10.0
Acrobat SOAP 10.0

I just start to programming for Acrobat JavaScript not long ago and not  understand why buttons code not work.
Would you be so kind to help me.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.10
Copyright ©2001-2017 Web Wiz Ltd.

This page was generated in 0.047 seconds.