          events (map #(-> %
                           (assoc :info (events-helper ctx % user-id false))) (so/get-all-user-events ctx user-id))
          connections (so/get-connections-badge ctx current-user-id)
-         endorsements (-> (all-user-endorsements ctx user-id true) :all-endorsements)
+         endorsements (-> (all-user-endorsements ctx user-id true))
          pending-badges (b/user-badges-pending ctx user-id)
          user-followers-fn (first (util/plugin-fun (util/get-plugins ctx) "db" "get-user-followers-connections"))
          user-followers (if-not (nil? user-followers-fn) (user-followers-fn ctx user-id) nil)

                                                  [:chunk.chunk (str (t :page/Description ul) ": ")][:chunk (str (:description c))]"\n"
                                                  [:chunk.chunk (str (t :badge/Imagefile ul) ": ")][:anchor {:target (str site-url "/" (:image_file c))} [:chunk.link (str site-url "/" (:image_file c))]]"\n"]))])])

        user-endorsements-template (pdf/template
                                     [:paragraph.generic
                                      (when-not (empty? $endorsements)
                                        [:paragraph
                                         [:heading.heading-name (str (t :badge/Myendorsements ul) ": ")]
                                         [:spacer 0]
                                         (into [:paragraph]
                                               (for [c $endorsements
                                                     :let [name (str (:first_name c) " " (:last_name c))]]
                                                 [:paragraph
                                                  [:chunk name]"\n"
                                                  [:chunk (:name c)]"\n"
                                                  [:chunk (date-from-unix-time (long (* 1000 (:mtime c))) "date")]"\n"
                                                  (process-markdown (:content c) (:user_badge_id c) "User Endorsements")]))])])
                                                  ;[:chunk.chunk (str (t :badge/BadgeID ul) ": ")] [:chunk (str (:id c))]"\n"
                                                  ;[:chunk.chunk (str (t :badge/Name ul) ": ")][:chunk (str (:name c))]"\n"
                                                  ;[:chunk.chunk (str (t :page/Description ul) ": ")][:chunk (str (:description c))]"\n"
                                                  ;[:chunk.chunk (str (t :badge/Imagefile ul) ": ")][:anchor {:target (str site-url "/" (:image_file c))} [:chunk.link (str site-url "/" (:image_file c))]]"\n"


        events-template (pdf/template
                          (let [template (cons [:paragraph]

                    :link {:family :times-roman
                           :color [66 100 162]}
                    :chunk {:size 11
                            :style :bold}
                    :small-heading {:size 13 :style :bold}}
        pdf-settings  (if (empty? font-path) {:stylesheet stylesheet  :bottom-margin 0 :footer {:page-numbers false :align :right}} {:font font :stylesheet stylesheet  :bottom-margin 0 :footer {:page-numbers false :align :right}})
        user-info-template (pdf/template
                             (let [template (cons [:paragraph]
