Not able to run #4

Closed
opened 2020-08-03 13:22:30 -04:00 by lucasemmoreira · 3 comments
lucasemmoreira commented 2020-08-03 13:22:30 -04:00 (Migrated from github.com)

Hi there,

I am trying to use your lib but something is not working for me. I am using leiningen and tried to import both versions

  • [clj-htmltopdf "0.1-alpha7"]
  • [clj-htmltopdf "0.1-alpha6"]

in both cases I get

Aug 03, 2020 11:17:10 AM org.apache.pdfbox.pdmodel.font.
WARNING: Using fallback font LiberationSans for base fon
Aug 03, 2020 11:17:10 AM org.apache.pdfbox.pdmodel.font.
WARNING: Using fallback font LiberationSans for base fon
Syntax error (ClassNotFoundException) compiling at (clj_
org.jsoup.parser.ParseSettings

Could you point me how can I fix this issue or if this is some mistake that I made?

my leiningen version
Leiningen 2.9.3 on Java 1.8.0_252 OpenJDK 64-Bit Server VM

my clojure version
Clojure 1.10.1, Java 1.8.0_252

Hi there, I am trying to use your lib but something is not working for me. I am using leiningen and tried to import both versions + [clj-htmltopdf "0.1-alpha7"] + [clj-htmltopdf "0.1-alpha6"] in both cases I get ``` Aug 03, 2020 11:17:10 AM org.apache.pdfbox.pdmodel.font. WARNING: Using fallback font LiberationSans for base fon Aug 03, 2020 11:17:10 AM org.apache.pdfbox.pdmodel.font. WARNING: Using fallback font LiberationSans for base fon Syntax error (ClassNotFoundException) compiling at (clj_ org.jsoup.parser.ParseSettings ``` Could you point me how can I fix this issue or if this is some mistake that I made? my leiningen version ` Leiningen 2.9.3 on Java 1.8.0_252 OpenJDK 64-Bit Server VM ` my clojure version ` Clojure 1.10.1, Java 1.8.0_252 `
gered commented 2020-08-06 08:24:10 -04:00 (Migrated from github.com)

I'm not sure why you wouldn't be able to run it, but I suspect it's because you're doing some extra config or have some extra code that you're not showing.

I just created a brand new project via lein new and had no issues:

$ lein --version
Leiningen 2.9.3 on Java 1.8.0_191 Java HotSpot(TM) 64-Bit Server VM
$ lein new pdftest1
Generating a project called pdftest1 based on the 'default' template.
The default template is intended for library projects, not applications.
To see other templates (app, plugin, etc), try `lein help new`.

project.clj

(defproject pdftest1 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [clj-htmltopdf "0.1-alpha7"]]
  :repl-options {:init-ns pdftest1.core})

core.clj

(use 'clj-htmltopdf.core)

(->pdf
  [:div
   [:h1 "HTML to PDF"]
   [:p "Glorious!"]]
  "output.pdf")

image

I'm not sure why you wouldn't be able to run it, but I suspect it's because you're doing some extra config or have some extra code that you're not showing. I just created a brand new project via `lein new` and had no issues: ``` $ lein --version Leiningen 2.9.3 on Java 1.8.0_191 Java HotSpot(TM) 64-Bit Server VM $ lein new pdftest1 Generating a project called pdftest1 based on the 'default' template. The default template is intended for library projects, not applications. To see other templates (app, plugin, etc), try `lein help new`. ``` project.clj ``` (defproject pdftest1 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "https://www.eclipse.org/legal/epl-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [clj-htmltopdf "0.1-alpha7"]] :repl-options {:init-ns pdftest1.core}) ``` core.clj ``` (use 'clj-htmltopdf.core) (->pdf [:div [:h1 "HTML to PDF"] [:p "Glorious!"]] "output.pdf") ``` ![image](https://user-images.githubusercontent.com/633985/89531382-26a00200-d7be-11ea-8383-12d5c07d08b4.png)
lucasemmoreira commented 2020-08-06 09:19:50 -04:00 (Migrated from github.com)

I am sorry, you are right. I was doing something wrong on my end. Just rewrote my project and it compiled.
Thank you!

I am sorry, you are right. I was doing something wrong on my end. Just rewrote my project and it compiled. Thank you!
gered commented 2020-08-06 09:46:36 -04:00 (Migrated from github.com)

No worries, glad you were able to fix it!

No worries, glad you were able to fix it!
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#4
No description provided.