-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image overlay inside cells #165
Comments
Yeah, there's no support for hooking into cell events at the moment. I'd be open to a PR for declaring an events hook in the table cell options map if you'd be interested to take a look. |
Ok, I'll look at it - will get back to you when I've thought a bit... |
Ok, made a PR! |
One option for putting images in cells would be to add some code I now have in my app to the library: ` (defn- v-align [alignment bottom height img-height] (defn- fit-image-fn [halignment valignment ^URL img-url] Used like:
|
Thanks, just saw the PR, and trying it out locally everything looks good to me. I think the helper functions would be useful to add. Might make sense to expose them declaratively via cell options. Maybe something like |
Ok, I’ll sketch something up and get back. |
Fantastic, and I'm good to do a release as soon as we get this ironed out. |
Thinking about it, maybe the best option is to just add a section in the readme with some examples. Theres a million things that one could do in cell event callbacks, with image background or overlay and shading being the ones that I needed now. A few simple examples might be enough to just show the idea. I agree that the declarative approach is really nice, but since we're using the more "advanced" part of the underlying API here it might make sense to just expose that in a nice way. |
I'm ok with that, if some common patterns emerge we can add declarative syntax to cover those via the standard API at a later point. I can push out a release tonight then. |
Ok, I'll add something to the doc and make a PR. If you want that in the release you'll have to wait until tomorrow, I'm a bit stuck with other things today. |
Found some time, and did a PR with example added to the readme. :-) |
...and a release would be terrific! |
Fantastic, thanks for adding the docs and I just pushed out |
I'm creating pdf:s with the library, using borderless nested pdf-tables to make it simple to place my content. My problem is that in addition to text and background, I would need to add image overlays inside some cells. In openpdf/itext such things seem to be done using cell events. Am I right in that there is no support for this in the library?
The text was updated successfully, but these errors were encountered: