1. stream.write(f"""
  2. import scribus
  3. import sys
  4. icc = "{icc}"
  5. margin = {margin}
  6. class exportPDF():
  7. def __init__(self, svg=sys.argv[1], o=sys.argv[2]):
  8. #scribus.newDocument(({width},{height}), (margin,margin,margin,margin),
  9. # PORTRAIT, 1, UNIT_MILLIMETERS, PAGE_1, 0, 1)
  10. #scribus.placeSVG(svg, 0, 0)
  11. scribus.openDoc(svg)
  12. pdf = scribus.PDFfile()
  13. if (margin > 0):
  14. pdf.bleedl = margin
  15. pdf.bleedr = margin
  16. pdf.bleedt = margin
  17. pdf.bleedb = margin
  18. pdf.bleedMarks = True
  19. pdf.colorMarks = True
  20. pdf.version = {pdfVersion}
  21. pdf.allowAnnots = True
  22. pdf.allowChange = True
  23. pdf.allowCopy = True
  24. pdf.allowPrinting = True
  25. pdf.noembicc = False #embed icc !
  26. pdf.solidpr = icc
  27. pdf.imagepr = icc
  28. pdf.printprofc = icc
  29. pdf.profiles = True
  30. pdf.profilei = True
  31. pdf.outdst = 1 # output destination = {{0=screen, 1=printer}}
  32. pdf.file = o
  33. pdf.compress = True
  34. pdf.compressmtd = 0 # 0 = automatic, 1 = jpeg ; 2 = zip, 3 = none
  35. pdf.quality = 0 #max
  36. pdf.fontEmbedding = {embedFonts}
  37. pdf.thumbnails = True
  38. pdf.save()
  39. exportPDF()""")
 
 

509

F String

作成者 Martin Owens

-

PasteBin

40
言葉
135
サイズ
1.3 KB
作成済み
タイプ
text/plain
Public Domain (PD)
コメントするにはログインしてください!