Processor Error Code 7310

The write(toFileURL:) method on Processor used to try to overwrite the file even if a file already existed at the specified file URL. We changed this behavior in version 9.4. See the following note in the changelog:

Improves error reporting when calling write(toFileURL:) on Processor with a URL where a file already exists. (#24092)

We changed this because, before this change, Processor would overwrite the existing document at the specified file URL, and in some cases, it corrupted the document.

We recommend checking for an existing file at the processed document location and either removing it if it already exists, or writing in a new location.

We also updated our documentation to reflect this information:

The URL to save the generated document to. Needs to be a file URL. There should be no file at this URL prior to calling this method. This method will throw an error in the case a file already exists.