AnswerBun.com

Generate wedding Invitations using tex

TeX - LaTeX Asked by dezza on October 26, 2020

I am looking at creating a bunch of PDFs that I can send out as wedding invitations. I tried using Python and Latex to create the invitations and then send them, but I have hit a brick wall. I have decided to pivot to getting LaTeX to create the documents and then using VBA (something I have experience doing) to send them based on the name of the PDF and the email address. I have a .csv with data that looks like this:

name_1,email_1
name_2,email_2
...

This is my TeX code so far, I am currently using XeLaTeX to compile the document and the last lines adds the background we want on the invitation:

documentclass[a4paper]{article}
usepackage{eso-pic,graphicx}
usepackage[top=2cm, bottom=2cm, outer=0cm, inner=0cm]{geometry}
usepackage{fontspec}
usepackage[absolute,overlay]{textpos}
usepackage{xcolor}

definecolor{orangeish}{HTML}{de762c}
definecolor{greyish}{HTML}{595959}

pagestyle{empty}

title{My Title}
begin{document}

begin{textblock*}{210mm}(0mm,70mm)
setmainfont{QuicksandBook-Regular}
color{orangeish}
fontsize{54}{60}selectfont
centering
SAVE THE DATE
end{textblock*}

begin{textblock*}{210mm}(0mm,110mm)
setmainfont{QuicksandLight-Regular}
color{greyish}
fontsize{18}{20}selectfont
centering
TO CELEBRATE THE WEDDING OF
end{textblock*}

begin{textblock*}{210mm}(0mm,145mm)
setmainfont{QuicksandLight-Regular}
color{greyish}
fontsize{48}{50}selectfont
centering
ME AND MY PARTNER
end{textblock*}

begin{textblock*}{210mm}(0mm,200mm)
setmainfont{QuicksandLight-Regular}
color{greyish}
fontsize{18}{20}selectfont
centering
01.01.2000par
LOCATIONpar
end{textblock*}

begin{textblock*}{200mm}(0mm,280mm)
setmainfont{Quicksand}
color{greyish}
fontsize{12}{15}selectfont
flushright
NAME ON THE .csvpar
INVITATIONS TO FOLLOW
end{textblock*}

 
AddToShipoutPictureBG*{includegraphics[width=paperwidth, height=paperheight]{save_the_date_2_compressed.jpeg}}

end{document}

So my question is, how can I get TeX to read all of the names from the .csv file and put them into the TeX code then produce a PDF named by those names?

Let me know if anything isn’t clear and I’ll reply asap!

Add your own answers!

Related Questions

How to draw a thick point?

2  Asked on June 9, 2021

   

Braces in a @for loop

2  Asked on June 9, 2021

   

Unable to convert references from IEEEtran style to apacite

1  Asked on June 9, 2021 by smita-singhal

 

How to insert latex into confluence page?

1  Asked on June 9, 2021 by candic3

 

Linespacing in algpseudocode

0  Asked on June 9, 2021 by lemonbonbon

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP