I know it's nor in standard nor in any draft but can you extend support of bleedbox to be available in 4 sizes. I expect it's not problem and is only extension and does't bkeak anything functional.
Th reason is that i use weasyprint to generate pages for printer working with SRA4(225x320 mm) paper an i need bleed mark to paper A4(210mmx297mm)
I tried to extend the functionality myself but I was unable to find out how adding validators and computers works.
You want bleed to behave like padding. Good news: it's not that hard 😄.
In validation.py, you can add a decorator for bleed around the expand_four_sides function, and 4 for bleed-left/right/top/bottom around the bleed function.
In properties.py, you can add bleed-left/right/top/bottom where bleed was added in 71d5409.
In css/__init__.py, you can replace bleed by bleed(_(left|right|top|bottom))? (not tested) in RE_INITIAL_NOT_COMPUTED (bleed's initial value is 'auto' where the calculated value depends on the value of marks).
You can then use a list where bleed is used as a single value (for example in document.py), and report these values when creating the bleed box (in pdf.py).
I think that's all! If you have any questions, you can fork and push what you've done even if it doesn't work, I'll help you to solve the problems you meet!
Only thing I'm not sure with is changes in weasyprint/pdf.py. Can you please take a look at it and tell me whether it is right. I'm not sure why there is dividing by 2 in create of self.BleedBox and I'm not sure if there should be used left or right on x axis and top or bottom on y axis.
If you want my patch to included we propably need some tests. If so, please suggest me how to do it.
marks: cropat 4:5, unknown property.
The text was updated successfully, but these errors were encountered: