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

如何生成黑底白字的表格 #9

Open
vector2myth opened this issue May 8, 2023 · 4 comments
Open

如何生成黑底白字的表格 #9

vector2myth opened this issue May 8, 2023 · 4 comments

Comments

@vector2myth
Copy link

No description provided.

@vector2myth
Copy link
Author

首先单元格的底色设置为黑色
在Table.py中的310行左右,注释掉这个if (col_span_value != 0) or (r, c) not in self.missing_cells:和以下的代码,然后用htmlcol_style += ' style="background-color: black;"'代替
其次设置边框颜色为白色在Table.py中的50行左右,self.pre_boder_style内
1: {
'name': 'border',
'style': {
'table': 'border:1px solid white;',
'td': 'border:1px solid white;',
'th': 'border:1px solid white;'
}
}

最后设置字体颜色为白色
这个暂时还没找到

@vector2myth
Copy link
Author

也是在Table.py中,在346行左右,我更改了代码如夏
txt = self.generate_random_text(text_type)
if self.cell_box_type == 'text':
txt = '' + '

' + txt + '

'

@vector2myth
Copy link
Author

其实就是在html中生成表格然后截取图片,因此设置黑底白字应该按照html的方法

@nissansz
Copy link

nissansz commented Oct 8, 2023

训练完了吗?效果怎么样?

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

No branches or pull requests

2 participants