Use form fields for this.
// Document Will Print scipt
// Get the current date/time
var oCurrent_Date = new Date();
// Update the date printed field
getField("DATE_PRINTED").value = "Printed: " + util.printd("yyyy-mm-dd HH:MM:ss", oCurrent_Date);
// Add 7 days to current date
oObsolete_Date = oCurrent_Date.setDate(oCurrent_Date.getDate() + 7);
// Update the Obsolete date field
getField("OBSOLETE_DATE").value = "Obsolete as of: " + util.printd("yyyy-mm-dd HH:MM:ss", oObsolete_Date);
Replace the field names in the getField statements with the actual names of the fields on your form.