Deletes an object previously added to the document.

 

   
Syntax
 
     

Doc.Delete ID

 

   
Params
 
     
Name   Type   Description
ID Long

The Object ID of the object to be deleted.

 

   
Notes
 
     

Use this method to delete an object previously added to the document.

For efficiency reasons deleted objects are not immediately erased. Instead they are flagged as inactive and any resources associated with them are freed. You can determine if an object is inactive by using the GetInfo function.

When the document is saved only active objects are exported.

 

   
Example
 
     

The following code snippet illustrates how one might add an image and then delete it if the image color space is CMYK.

Set theDoc = Server.CreateObject("ABCpdf3.Doc")
theID1 = theDoc.AddImage("c:\mypic.jpg")
theID2 = theDoc.GetInfo(theID1, "XObject")

theComps = theDoc.GetInfo(theID2, "Components")
If theComps = 4 Then theDoc.Delete(theID1)
theDoc.Save "c:\docdelete.pdf"


docdelete.pdf

   

 

Browser Based Help. Published by chm2web software.