Here is a simple teaching edition version that accomplishes what you’re asking…
tell application id "DNtp"
repeat with thisFile in (selected records)
set recDB to (database of thisFile) -- In case you're acting on smart groups or search results
set recKind to (kind of thisFile as string) -- A localized value but this is safe since it's just used for the error message, if needed
set newRecord to convert record thisFile to PDF document -- Convert the file to a paginated PDF in place
if (newrecord ≠ missing value) then -- Check to see if the record was made
move record thisFile to trash group of recDB -- If so, move the original to the Trash
display alert "Can't convert " & recKind & " files into PDFs." -- Warn and continue…
This code would be usable on a selection in a group or a smart group - global or local.