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.

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


Sub DeleteDocumentJavaScript(InputFileName As String, _
                             OutputFileName As String, _
                             IndexOrName As NameOrIndex)


def DeleteDocumentJavaScript(self, InputFileName, OutputFileName, IndexOrName)




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


function DeleteDocumentJavaScript($InputFileName,
                                  $OutputFileName,
                                  $IndexOrName) 


BclPrcResult DeleteDocumentJavaScript(const BclPDFProcessorSettings* pSettings,
                                      const wchar_t* InputFileName,
                                      const wchar_t* OutputFileName,
                                      const wchar_t* Name,
                                      int Index);
Sub DeleteDocumentJavaScript(InputFileName As String, OutputFileName As String, IndexOrName As Variant)




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"));