This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-31
Channels
- # beginners (64)
- # boot-dev (5)
- # calva (2)
- # clojars (2)
- # clojure (27)
- # clojure-europe (2)
- # clojure-india (1)
- # clojure-italy (30)
- # clojure-nl (3)
- # clojure-spec (46)
- # clojure-uk (19)
- # clojurescript (38)
- # code-reviews (2)
- # cursive (2)
- # datomic (15)
- # events (2)
- # graphql (3)
- # kaocha (1)
- # leiningen (5)
- # lumo (2)
- # off-topic (29)
- # perun (1)
- # re-frame (40)
- # reagent (5)
- # rum (3)
- # spacemacs (11)
- # specter (4)
- # tools-deps (4)
anybody used lanterna? I cannot for the life of me figure out how to simply get a newline to display
Maybe something about the way it displays characters in cells means that a new line wont implicitly move to a cell below?
I need to convert file to PDF, but: - things have to be precise to each mm - input file has to be in format easy to edit by user, PhotoShop, some kind of drawing in web browser, maybe even XML - if font is too big to fit text into space it needs to decrease font I don’t any good solution to do it. Generating PDF is a nightmare. * Unless I want to pay a lot for some extra payment SaaS or libraries
What is the best way in your opinion to convert input (file, XML, etc.) to PDF with precision to 1 mm?
But idea is to make a product from it, so I don’t want to stick with any sick high price licence
Depending on how you want to deliver this to users, the cheap-and-cheerful option is to make a printer-friendly HTML page and let users print to PDF (or paper) themselves
Only with Java and even then it is super hard. But with Java code users can’ really give an input as a file
In what way can something be precise to each mm, but also auto-adjust text size? I don't understand how those two desires can be satisfied at the same time.
I feel like I must be missing something… why is it that when I call keys
on a sorted-map
, I don’t get a sorted collection? I am trying to implement a simple interval tree, and this gap is a sticking point.
if you mean a seq of the keys in order, I am not sure, but I would be surprised if that is not what you get, so I wonder what makes you think that is not what you are getting
user=>
(let [x (shuffle (range 32))]
(= (sort x)
(keys (into (sorted-map) (zipmap x x)))))
true
user=>
in general what you want to do might be a headache and a half, but it might be possible to hack together something specific
Like, a brute force way might be (if you are printing only one line on a label) to pick a font size based on a heuristic (12, lets say) and then render a pdf. Run an image of that pdf through handwriting recognition software and see if it reads it correctly
and if there is none then you can send a message back to your users that there is no way for you to do it
@hiredman I mean something that implements clojure.lang.Sorted
so you can use subseq
on it.
They do come back in the expected order, but not implementing the right interfaces to take full advantage of that.
Ah, but it turns out the map itself does implement sorted, so I can use subseq
directly on that, which addresses my efficient interval matching quite effectively.
That’s what I was missing. ^_^