Clear the PDF

Each PDF document created or modified by ABCpdf is held in a "Doc" object. In these examples, the PDF object is in a variable called "theDoc". To clear the PDF you simply assign a new "Doc" object to the variable "theDoc". C#'s garbage handling will dispose of the old copy for you.

 


Example Code

The code (without error handling) that cleared the PDF is:

theDoc.Clear();