The following post at Adobe Support Community might be of interest here.
Quoted in case the original disappears:
Original PostScript, which includes to level 3, had functions file and writestring. These could open a file for output, and to it write strings. From Acrobat ≈8.1 these were by default disabled, for understandable security reasons.
The internets hint that such file functionality can be re-enabled, but without details that work on my OS. Please, how can this functionality be re-enabled?
On macOS High Sierra 10.13.6, I have access to
• Adobe Distiller XI Pro 11.0.23 (01/11/2017); and to
• Adobe Distiller Professional 8.3.1 (30/08/2011).
Enabling it in either would suffice; former preferred; both even better. Indeed, it could be of broader use to give a full listing encompassing other versions and other OSs.