1
即時通訊使用xhtml2pdf在django中生成報告,我想讓我的一個單元格文本垂直顯示,但我無法使用css。蟒蛇xhtml2pdf表格單元格文本顯示爲垂直
下面是一些嘗試:
.vertical-text {
writing-mode: tb-rl;
}
<table>
<tbody>
<tr>
<td class="vertical-text" >V text</td>
</tr>
</tbody>
</table>
UPDATE
writing-mode
屬性在supported css properties失蹤。有什麼解決方法嗎?
儘管如此,在我的情況下不會有可能,但所有的建議是nodejs的權利?是否沒有任何第三方python插件提供更少的css限制pdf?你對weasyprint有什麼看法?到目前爲止,我還沒有問過這件事。 –
@ ShiftN'Tab還有一些基於python的第三方庫,如你所說,[Weasyprint](http://weasyprint.readthedocs.io/en/latest/features.html#css-transforms-module-level- 1)確實爲您提供了傳輸和旋轉文本(現代瀏覽器支持)的選項。 [PDFKit](https://pypi.python.org/pypi/pdfkit)也有一個python實現。 –
生病請嘗試兩個 –