我正在用python开发一个程序来制作抽奖票。该程序只通过修改票证编号,就可以根据需要从参考映像中创建多少张票。我有一个可能有几百个项目的图像列表。我想调整我的图像大小,并将它们保存在一个pdf允许打印。用户必须在A4页面上选择每行和每列的票数。
PIL_img_list = [...]
nbr_per_line = input("Number of ticket per line")
nbr_per_column = input("Number of ticket per column")
有谁有主意吗?
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.lib.styles import ParagraphStyle
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Simple
可以用borb写阿拉伯字母吗?
我试过borb中的14种可能的字体,但没有人能够显示阿拉伯字母。
from borb.pdf import Document
from borb.pdf import PDF
from borb.pdf import Page
from borb.pdf import Paragraph
from borb.pdf import SingleColumnLayout
def main():
# Create an empty Document.
pdf = Document()
# Add an empty Page.
p
我正在创建一个小部件,它在一个Stack中显示一个Container。在Stack内部,Positioned小部件中有一个动态Column,它将Column粘贴到Bottom上。
我正在尝试将Stack包装在一个SingleChildScrollView中,如果动态Column有很多子组件,它将能够滚动。
但是,在添加滚动视图后,我会得到以下错误消息:
RenderStack object was given an infinite size during layout.
我正在动态创建一个iframe:
function iFrame(parentElement)
{
var iframe = document.createElement("iframe");
if (parentElement == null)
{
parentElement = document.body;
}
parentElement.appendChild(iframe);
iframe.doc = null;
if (iframe.contentDocument)
{
i
我想在页面的右侧创建一条动态垂直线。
我更喜欢只在CSS中做这件事。我希望能够将行设置在某个高度,但当文本扩展时,行当然应该扩展,而且垂直位置也应该能够设置。
所以:
|
| This is some text, |
| more text |
| and more text |
| |
|
|
|
| This is a longer |
| text piece. |
| hopefully I am not |
| too confusing. |
| And the great