Looking for a product or
service? Our Solution Finder
can help you find it fast!
 
   • Products & Services     • Buy software   
   • Downloads     • Support   
   • Mailpiece-design site     • Client list   
   • Company information     • Links   
   • Free newsletter     • FAQ   
   • Case studies     • Contact us   
   • News archives     • Press   
   • Customer testimonials   
   • Home   
   
 
  Click here to read some
MYTHS and FACTS about
variable-data publishing.
 
 
  Click here to sign up for our free newsletter.  






































































































































































































































































   Citation Software Inc.
 Specialists in variable-data publishing since 1986
  
  
 www.CitationSoftware.com               info@CitationSoftware.com               508-436-2543
  
  
  
 

   Search
    
* Click here to sign up for our free newsletter.
 
Sample code for StampPDF Batch

The following examples show only the code that is needed to set up the command-line call, invoke StampPDF Batch, 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
sStampPDFBatchAppl = sStampPDFBatch & " -r " & sStampPDFBatchRegNum
sStampPDFBatchParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sStampPDFBatchParms = sStampPDFBatchParms & " " &InPdfFile & " " & sInFdfFile
sStampPDFBatchCmd = sStampPDFBatchAppl & " " & sStampPDFBatchParms

'Create the Shell object to run the StampPDF Batch command line.
Set wShell = Server.CreateObject("WScript.Shell")

'Execute the StampPDF Batch command line and get the return code.
iReturn = wShell.Run( sStampPDFBatchCmd, 10, True )
Set wShell = Nothing

PERL
#Build the Executable statement
$StampPDFBatchAppl = "$StampPDFBatch -r $StampPDFBatchRegNum";
$StampPDFBatchParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$StampPDFBatchCmd = $StampPDFBatchAppl . $StampPDFBatchParms;

#Execute the StampPDF Batch command line and get the return code.
$Return = `$StampPDFBatchCmd`;

Java
//Build the Executable statement
sStampPDFBatchAppl = sStampPDFBatch + " -r " + sStampPDFBatchRegNum;
sStampPDFBatchParms = " -s -p -l " + sLogFile + " -o " + sOutPDFFile;
sStampPDFBatchParms = sStampPDFBatchParms + " " + InPdfFile + " " + sInFdfFile;

//Add "cmd /c" if you are running on Windows (Leave out if running on Unix)
sStampPDFBatchCmd = "cmd /c " + sStampPDFBatchAppl + " " + sStampPDFBatchParms;

//Create the process to run the StampPDF Batch command line.
Process cmdlProcess;

//Execute the StampPDF Batch command line and get the return code.
cmdlProcess = Runtime.getRuntime().exec ( sStampPDFBatchCmd );
cmdlProcess.waitFor ();
iReturn = cmdlProcess.exitValue();

PHP
#Build the Executable statement $StampPDFBatchAppl = "$StampPDFBatch -r $StampPDFBatchRegNum";
$StampPDFBatchParms = "-s -p -l $LogFile -o $OutPdfFile $InPdfFile $InFdfFile";
$StampPDFBatchCmd = $StampPDFBatchAppl . $StampPDFBatchParms;

#Execute the StampPDF Batch command line and get the return code.
$Return = system($StampPDFBatchCmd);

Visual Basic
'Build the Executable statement
sStampPDFBatchAppl = sStampPDFBatch & " -r " & sStampPDFBatchRegNum
sStampPDFBatchParms = " -s -p -l " & sLogFile & " -o " & sOutPDFFile
sStampPDFBatchParms = sStampPDFBatchParms & " " &InPdfFile & " " & sInFdfFile
sStampPDFBatchCmd = sStampPDFBatchAppl & " " & sStampPDFBatchParms

'Execute the StampPDF Batch command line and get the return code.
iReturn= Shell(sStampPDFBatchCmd)
 




    
Click here to go to the Solution Finder Menu

• Products & Services   • Buy software   • Downloads   • Support
• Mailpiece-design site   • Client list   • Company information   • Links
• Free newsletter   • FAQ   • Case studies   • Contact us
• News archives   • Press   • Customer testimonials   • Home


   Search

Copyright © 2008 Citation Software Inc.
info@CitationSoftware.com
508-436-2543
www.CitationSoftware.com
print on demand