BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

DeleteDocumentJavaScript Method

Deletes the specified document-level JavaScript from the PDF.

Sub DeleteDocumentJavaScript(InputFileName As String, OutputFileName As String, IndexOrName As Variant)

void DeleteDocumentJavaScript(string InputFileName, string OutputFileName, NameOrIndex IndexOrName)

void DeleteDocumentJavaScript(String InputFileName, String OutputFileName, NameOrIndex IndexOrName) throws PDFProcessorException

Where NameOrIndex is a utility class:

public class NameOrIndex
{
   public NameOrIndex(String name);
   public NameOrIndex(int index);
}

Parameters

Return Values

N/A

Remarks

Each script is auto-executed upon document open. All JavaScript function definitions are global, and available to be called from other scripts in the PDF. Multiple scripts behave as if they were merged into a single big script.

Note that the name of a script does not affect its functionality in any way. It is only used for organizational and documentation purposes. You can consider the name of the script as a comment. However, each script must have a unique name that may not be empty.

Note: This function can only delete the global document-level scripts. Only one script can be deleted per function call.

Example Usage (VB)

Set oProcessor = CreateObject("easyPDF.PDFProcessor.8")
 
oProcessor.DeleteDocumentJavaScript "C:\test\input.pdf", "C:\test\output.pdf", "Script1"

Example Usage (Native C#)

PDFProcessor processor = new PDFProcessor();
processor.DeleteDocumentJavaScript(@"C:\test\input.pdf", @"C:\test\output.pdf", new NameOrIndex("Script1"));

Example Usage (Native Java)

PDFProcessor processor = new PDFProcessor();
processor.DeleteDocumentJavaScript("C:\\test\\input.pdf", "C:\\test\\output.pdf", new NameOrIndex("Script1"));