|
|
|
|
|
|
|
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 FDFMerge and FDFMerge Lite
|
The following examples show only the code that is needed
to set up the command-line call, invoke FDFMerge or FDFMerge Lite, 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
sFdfMergeAppl = sFdfMerge & " -r " & sFdfMergeRegNum
sFdfMergeParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sFdfMergeParms = sFdfMergeParms & " " &InPdfFile & " " & sInFdfFile
sFdfMergeCmd = sFdfMergeAppl & " " & sFdfMergeParms
'Create the Shell object to run the FDFMerge command line.
Set wShell = Server.CreateObject("WScript.Shell")
'Execute the FDFMerge command line and get the return code.
iReturn = wShell.Run( sFdfMergeCmd, 10, True )
Set wShell = Nothing
|
PERL
#Build the Executable statement
$FDFMergeAppl = "$FdfMerge -r $FdfMergeRegNum";
$FdfMergeParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$FdfMergeCmd = $FDFMergeAppl . $FdfMergeParms;
#Execute the FDFMerge command line and get the return code.
$Return = `$FdfMergeCmd`;
|
Java
//Build the Executable statement
sFdfMergeAppl = sFdfMerge + " -r " + sFdfMergeRegNum;
sFdfMergeParms = " -s -p -l " + sLogFile + " -o " + sOutPDFFile;
sFdfMergeParms = sFdfMergeParms + " " + InPdfFile + " " + sInFdfFile;
//Add "cmd /c" if you are running on Windows (Leave out if running on Unix)
sFdfMergeCmd = "cmd /c " + sFdfMergeAppl + " " + sFdfMergeParms;
//Create the process to run the FDFMerge command line.
Process cmdlProcess;
//Execute the FDFMerge command line and get the return code.
cmdlProcess = Runtime.getRuntime().exec ( sFdfMergeCmd );
cmdlProcess.waitFor ();
iReturn = cmdlProcess.exitValue();
|
PHP
#Build the Executable statement $FDFMergeAppl = "$FdfMerge -r $FdfMergeRegNum";
$FdfMergeParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$FdfMergeCmd = $FDFMergeAppl . $FdfMergeParms;
#Execute the FDFMerge command line and get the return code.
$Return = system($FdfMergeCmd);
|
Visual Basic
'Build the Executable statement
sFdfMergeAppl = sFdfMerge & " -r " & sFdfMergeRegNum
sFdfMergeParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sFdfMergeParms = sFdfMergeParms & " " &InPdfFile & " " & sInFdfFile
sFdfMergeCmd = sFdfMergeAppl & " " & sFdfMergeParms
'Execute the FDFMerge command line and get the return code.
iReturn= Shell(sFdfMergeCmd)
|
|
|
|
|
|
Copyright © 2008 Citation Software Inc.
info@CitationSoftware.com
508-436-2543
www.CitationSoftware.com
|
|