-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Tiling pattern support #2348
Comments
In our fork I went with the option to set the pattern as |
PR is welcome. |
Great. Will create the PR as soon as the pdfkit PR is merged. I suppose that a new version of foliojs-fork/pdfkit with the mentioned changes would need to be released. |
Thanks for the merge! Anything I can do to get this into master too? |
Ported to master by commit 1a06114. |
New version released. |
@jlogar Would be good add to documentation https://github.com/pdfmake/docs |
I've implemented the tiling pattern support for pdfkit (foliojs/pdfkit#526). The PR foliojs/pdfkit#1311 is awaiting review/merge.
I'm currently developing support for that on our fork pdfmake (using the forked pdfkit). If the mentioned PR gets merged I would also like to add support for patterns to pdfmake.
Patterns need to be defined as resources in PDF so a
patterns
field would need to be added to the document definition. Something along the lines of:I was wondering how I should go about implementing pattern usage in the content though. Looking at gradients implementation (in 0.2 branch) i see that a separate
linearGradient
field has been added. I was considering adding apattern
field (let's say for text and table cells/layouts). But I have second thoughts on that. Thepattern
andfillColor
for table cells are more or less mutually exclusive. And pdfkit itself (and PDF spec itself) more or less treats patterns as just another color. So I am more inclined to just make thecolor
/fillColor
/background
field accept a pattern tuple.So that is:
vs.:
I would like to hear your thoughts on that. And whether such a PR would be needed/accepted.
The text was updated successfully, but these errors were encountered: