Moved withTempDir from PDF to Shared, export from Shared.

API change.