                   (prn-str items))))
       ;; if the file is empty go back to the upload form
       (custom-form request year issue ["No file selected"]))))
-
-(defmulti custom (fn [_ _ _ _ _ fmt _] fmt))
-
-(defmethod custom :pdf [request year issue query customer fmt items]
-  (let [filename (file-name :catalog-custom customer)
-        temp-file (java.io.File/createTempFile filename ".pdf")]
-    (-> items
-        edn/read-string
-        vubis/order
-        (layout.fop/document :custom year issue nil nil :query query :customer customer)
-        (layout.fop/generate-pdf! temp-file))
-    (pdf-response temp-file filename)))
-
-(defmethod custom :grossdruck [request year issue query customer fmt items]
-  (let [filename (file-name :catalog-custom customer)
-        temp-file (java.io.File/createTempFile filename ".pdf")]
-    (-> items
-        edn/read-string
-        vubis/order
-        (layout.fop/document :custom-grossdruck year issue nil nil :query query :customer customer)
-        (layout.fop/generate-pdf! temp-file))
-    (pdf-response temp-file filename)))
-
-(defmethod custom :braille [request year issue query customer fmt items]
-  (-> items
-      edn/read-string
-      vubis/order
-      (layout.dtbook/dtbook {:query query :customer customer})
-      (xml-response (file-name :catalog-custom customer))))
-
-(defmethod custom :plain-text [request year issue query customer fmt items]
-  (-> items
-      edn/read-string
-      vubis/order
-      (layout.text/text {:query query :customer customer})
-      (text-response (file-name :catalog-custom customer))))

       (customer-field nil)
       (format-field :pdf)
       (form/submit-button {:class "btn btn-default"} "Submit"))])))

(defn custom-confirm [request year issue query customer fmt file]
  (let [{tempfile :tempfile} file

        (upload-form request year issue ["No file selected"])
        (upload-full-form request year issue {fmt ["No file selected"]})))))

(defn editorial-form [request fmt year issue]
  (let [identity (friend/identity request)
        editorial (db/read-editorial year issue fmt)
