Only one object gets rendered. #1

Closed
opened 2018-06-21 03:27:27 -04:00 by jsofra · 3 comments
jsofra commented 2018-06-21 03:27:27 -04:00 (Migrated from github.com)

When converting html to pdf it seems only the first object is getting rendered.

When converting html to pdf it seems only the first object is getting rendered.
jsofra commented 2018-06-21 20:21:10 -04:00 (Migrated from github.com)

Looks like any tags after the object do not get rendered.
In the example from the README the final tag [:p "Text after the object"] does not get rendered.

(->pdf
  [:div
   [:h2 "Object Drawing Test"]
   [:object {:id "the-object" :style "width: 400px; height: 300px;"}]
   [:p "Text after the object"]]
  "object.pdf"
  {:objects
   {:by-id
    {"the-object"
     (fn [object-element-attrs ^java.awt.Graphics2D g]
       (.setColor g java.awt.Color/RED)
       (.drawRect g 50 50 200 200)
       (.setColor g java.awt.Color/BLUE)
       (.drawRect g 75 75 300 200))}}})
Looks like any tags after the object do not get rendered. In the example from the README the final tag `[:p "Text after the object"]` does not get rendered. ```clojure (->pdf [:div [:h2 "Object Drawing Test"] [:object {:id "the-object" :style "width: 400px; height: 300px;"}] [:p "Text after the object"]] "object.pdf" {:objects {:by-id {"the-object" (fn [object-element-attrs ^java.awt.Graphics2D g] (.setColor g java.awt.Color/RED) (.drawRect g 50 50 200 200) (.setColor g java.awt.Color/BLUE) (.drawRect g 75 75 300 200))}}}) ```
gered commented 2018-06-22 07:13:42 -04:00 (Migrated from github.com)

Hmm, interesting, I could swear that was working just fine previously (I clearly recall testing a document with two object tags and text in-between). I'll take a look!

Hmm, interesting, I could swear that was working just fine previously (I clearly recall testing a document with two object tags and text in-between). I'll take a look!
gered commented 2018-06-22 07:16:44 -04:00 (Migrated from github.com)

Your example actually works perfectly for me.

image

Could you double check?

Your example actually works perfectly for me. ![image](https://user-images.githubusercontent.com/633985/41774060-2d1d68f6-75ec-11e8-9357-03535a7b761a.png) Could you double check?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gered/clj-htmltopdf#1
No description provided.