Advertisement
Guest User

mailmerge PostScript jinja2 template

a guest
Jun 25th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. %!PS-Adobe-2.0
  2. %%Creator: mailmerge.py
  3. %%Title: invitation-envelope
  4. %%Pages: 1
  5. %%PageOrder: Ascend
  6. %%BoundingBox: 0 0 612 792
  7. %%DocumentPaperSizes: 155mm
  8. %%EndComments
  9.  
  10. % Page size is 155mm square envelope
  11. <<
  12.     /PageSize [439 439]
  13. >> setpagedevice
  14.  
  15. /Times-Roman findfont
  16.  
  17. dup length dict begin
  18. {1 index /FID ne {def} {pop pop} ifelse} forall
  19. /Encoding ISOLatin1Encoding def
  20. currentdict
  21. end
  22. /EnvelopeLatin1 exch definefont pop
  23.  
  24. /EnvelopeLatin1 findfont
  25. 12 scalefont
  26. setfont
  27.  
  28. newpath
  29. {% set context = namespace(vpos=vstart|default(250)) %}
  30. {% for line in lines %}
  31. 100 {{ context.vpos }} moveto
  32. ({{ line }}) show
  33. {% set context.vpos = context.vpos - 20 %}
  34. {% endfor %}
  35. showpage
  36. %%EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement