     }
     
     /// Parses the `Publication` from the provided file and the `parsers`.
-    private func parsePublication(from file: PublicationFile, warnings: WarningLogger?) -> Deferred<Publication, Publication.OpeningError> {
+    private func parsePublication(from file: PublicationFile, warnings: WarningLogger?, onCreatePublication: Publication.Builder.Transform?) -> Deferred<Publication, Publication.OpeningError> {
         return deferred(on: .global(qos: .userInitiated)) {
             var parsers = self.parsers
             var parsedBuilder: Publication.Builder?

    ///     publication, for example a password.
    ///   - sender: Free object that can be used by reading apps to give some UX context when
    ///     presenting dialogs.
    ///   - warnings: Logger used to broadcast non-fatal parsing warnings.
    public func open(file: File, allowUserInteraction: Bool, credentials: String? = nil, sender: Any? = nil, warnings: WarningLogger? = nil, completion: @escaping (CancellableResult<Publication, Publication.OpeningError>) -> Void) {
        log(.info, "Open \(file.url.lastPathComponent)")

        return createFetcher(for: file, allowUserInteraction: allowUserInteraction, password: credentials, sender: sender)

            
            // Transform from the Content Protection.
            builder.apply(file.onCreatePublication)
            // Transform provided by the reading app during the construction of the `Streamer`.
            builder.apply(self.onCreatePublication)
            // Transform provided by the reading app in `Streamer.open()`.
            if let onCreatePublication = onCreatePublication {
                builder.apply(onCreatePublication)
            }

            return .success(builder.build())
        }
