Use the new external document API