To 'overwrite' a file, your program simply open it and write to it (see, for instance
"How to: Write Text to a File"[
^])
On the other hand, if you need to overwrite it with meaningful info (that is a well formed
PDF
document), then you probably need a library (
Google[
^] is your friend).