|
|
|
|
|
|
|
Citation Software Inc.
Specialists in variable-data publishing since 1986
|
|
|
|
www.CitationSoftware.com info@CitationSoftware.com 508-436-2543
|
|
|
|
|
|
|
|
|
|
|
*
|
Click here to sign up for our free newsletter.
|
|
|
|
|
|
Sample code for APSplit
|
The following examples show only the code that is needed
to set up the command-line call, invoke APSplit, and
capture the returned code. You will need to establish the
proper context for this code by writing your own code to
declare the required variables (if your programming language
requires it), etc.
|
ASP
'Build the Executable statement
sAPSplitAppl = sAPSplit & " -r " & sAPSplitRegNum
sAPSplitParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sAPSplitParms = sAPSplitParms & " " &InPdfFile & " " & sInFdfFile
sAPSplitCmd = sAPSplitAppl & " " & sAPSplitParms
'Create the Shell object to run the APSplit command line.
Set wShell = Server.CreateObject("WScript.Shell")
'Execute the APSplit command line and get the return code.
iReturn = wShell.Run( sAPSplitCmd, 10, True )
Set wShell = Nothing
|
PERL
#Build the Executable statement
$APSplitAppl = "$APSplit -r $APsPLITRegNum";
$APSplitParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$APSplitCmd = $APSplitAppl . $APSplitParms;
#Execute the APSplit command line and get the return code.
$Return = `$APSplitCmd`;
|
Java
//Build the Executable statement
sAPSplitAppl = sAPSplit + " -r " + sAPSplitRegNum;
sAPSplitParms = " -s -p -l " + sLogFile + " -o " + sOutPDFFile;
sAPSplitParms = sAPSplitParms + " " + InPdfFile + " " + sInFdfFile;
//Add "cmd /c" if you are running on Windows (Leave out if running on Unix)
sAPSplitCmd = "cmd /c " + sAPSplitAppl + " " + sAPSplitParms;
//Create the process to run the APSplit command line.
Process cmdlProcess;
//Execute the APSplit command line and get the return code.
cmdlProcess = Runtime.getRuntime().exec ( sAPSplitCmd );
cmdlProcess.waitFor ();
iReturn = cmdlProcess.exitValue();
|
PHP
#Build the Executable statement $APSplitAppl = "$APSplit -r $APSplitRegNum";
$APSplitParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$APSplitCmd = $APSplitAppl . $APSplitParms;
#Execute the APSplit command line and get the return code.
$Return = system($APSplitCmd);
|
Visual Basic
'Build the Executable statement
sAPSplitAppl = sAPSplit & " -r " & sAPSplitRegNum
sAPSplitParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sAPSplitParms = sAPSplitParms & " " &InPdfFile & " " & sInFdfFile
sAPSplitCmd = sAPSplitAppl & " " & sAPSplitParms
'Execute the APSplit command line and get the return code.
iReturn= Shell(sAPSplitCmd)
|
|
|
|
|
|
Copyright © 2008 Citation Software Inc.
info@CitationSoftware.com
508-436-2543
www.CitationSoftware.com
|
|