Skip to content
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

Requesting support for Gradient Color Fill and Stroke #1141

Closed
HemaSudha1498 opened this issue Apr 10, 2024 · 5 comments
Closed

Requesting support for Gradient Color Fill and Stroke #1141

HemaSudha1498 opened this issue Apr 10, 2024 · 5 comments

Comments

@HemaSudha1498
Copy link

I would like to request a feature for implementing gradient colors for background and stroke effects for lines and rectangles. If this functionality already exists in the current build, could you please provide me with sample code to achieve this?

Expected:
gradientBg

@asturio
Copy link
Member

asturio commented Apr 10, 2024

I'm not sure if there is already such a functionality.
Any idea, how this could be implemented?
A possibility should be using SVG to create the images you want, and setting that as background.

@mkl-public
Copy link
Contributor

mkl-public commented Apr 16, 2024

I think nothing much changed in regard to creating shadings between iText 2.1.7 and iText 5.x (except package names), so please try something along the lines of this stack overflow answer or this one.

@asturio
Copy link
Member

asturio commented Apr 16, 2024

This seems to be much simpler than I thought.
@HemaSudha1498 , please give a try on what @mkl-public mentioned, and tell us, if you had success.

@asturio
Copy link
Member

asturio commented Apr 18, 2024

Just added @mkl-public example in pdf-toolbox.

@HemaSudha1498
Copy link
Author

Its working perfectly, thanks thank you @mkl-public @asturio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants