Exemple #1
0
def moveToMiddle():
    cdrObj = CDR()
    # cdrObj.moveToLandscapeMiddle("测试1")
    # cdrObj.moveToLeft(obj)
    # cdrObj.moveToRight('测试1')
    # cdrObj.moveToTop('测试1')
    # cdrObj.moveToBottom('测试1')
    # cdrObj.moveToVerticalMiddle('测试1')
    cdrObj.moveToCenter('测试1')
Exemple #2
0
def combineTest():
    cdrObj = CDR()
    obj = cdrObj.insertParaText(
        [0, 0, 120, 500], '测试1',
        '我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf1111我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf111111'
    )
    cdrObj.setColor(obj, [255, 0, 0])
    cdrObj.addFontSize(obj, 24)
    cdrObj.moveToCenter(obj)
    cdrObj.modifyParaText(
        obj,
        'dfs123123大1sdfasfsfsdf2312dfsadfsfsdf11111我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf11111我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf11111我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf11111我是内容123123大1sdfasfsfsdf2312dfsadfsfsdf11111',
        [5, 50, 100, 50], '', '')
    cdrObj.setFontSize(obj, 10)