       (clojure.string/replace #"stroke=\"rgba\(([^,\)]*),([^,\)]*),([^,\)]*),([^,\)]*)\)\""
                               "stroke=\"rgb($1,$2,$3)\" stroke-opacity=\"$4\"")))
 
-(defn- clear-svg [svg]
-  (-> svg remove-empty-img remove-opacity replace-rgba))
-
 (defn- trim-svg-string [str]
   (let [left-trim-str (clojure.string/replace str #"^\"" "")
         right-trim-str (clojure.string/replace left-trim-str #"\"$" "")]

  (try
    (with-open [out (new ByteArrayOutputStream)]
      (pdf [{:size pdf-size :orientation (if landscape :landscape nil)}
            [:svg {:translate [x y]} (clear-svg (remove-cursor (trim-svg-string svg)))]]
           out)
      {:ok true :result (.toByteArray out)})
    (catch Exception e {:ok false :result (.getMessage e)})))

(defn svg-to-png [svg widht height force-transparent-white]
  (try
    (with-open [out (new ByteArrayOutputStream)]
      (let [svg (clear-svg svg)
            string-reader (new StringReader svg)
            transcoder-input (new TranscoderInput string-reader)
            transcoder-output (new TranscoderOutput out)
