         //       - inject pagination
         if let link = publication.link(withHref: path),
             link.typeLink == "application/xhtml+xml" || link.typeLink == "text/html",
-            publication.metadata.rendition.layout == .reflowable && link.properties.layout == nil
-                || link.properties.layout == "reflowable",
-            let baseUrl = publication.baseUrl?.deletingLastPathComponent()
-        {
-            decodedInputStream = injectHtml(in: decodedInputStream, for: baseUrl)
+            let baseUrl = publication.baseUrl?.deletingLastPathComponent() {
+            if publication.metadata.rendition.layout == .reflowable && link.properties.layout == nil
+                || link.properties.layout == "reflowable"
+            {
+                decodedInputStream = injectReflowableHtml(in: decodedInputStream, for: baseUrl) as! DataInputStream
+            } else {
+                decodedInputStream = injectFixedLayoutHtml(in: decodedInputStream, for: baseUrl) as! DataInputStream
+            }
         }
 
         return decodedInputStream

        return enhancedStream
    }

    fileprivate func getHtmlLink(forRessource ressourceName: String) -> String {
        let prefix = "<link rel=\"stylesheet\" type=\"text/css\" href=\""
        let suffix = "\"/>\n"


        var includes = [String]()

        includes.append("<meta name=\"viewport\" content=\"width=device-width, height=device-height, initial-scale=1.0;\"/>\n")
        /// Readium CSS -- Pagination.
        // HTML5 patches.
        includes.append(getHtmlLink(forRessource: "\(baseUrl)styles/html5patch.css"))
