# 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*}

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!

## Related Questions

### Customizing the Sub-entries of the Index for a Key Person Entry

1  Asked on June 9, 2021

### LuaLaTeX: How to speed up PDF generation?

2  Asked on June 9, 2021

### Generate new .bib file from multiple .bib files (or .tex file?)

1  Asked on June 9, 2021 by physicshobbit

### How to draw a thick point?

2  Asked on June 9, 2021

### Braces in a @for loop

2  Asked on June 9, 2021

### How to correctly display 〈 and 〉 in a listing’s listing?

0  Asked on June 9, 2021

### macro definition in document body with newcommand inserts spaces

1  Asked on June 9, 2021 by user100361

### Unable to convert references from IEEEtran style to apacite

1  Asked on June 9, 2021 by smita-singhal

### Pass the final/draft option to the document from the command line

0  Asked on June 9, 2021

### Save files in folders instead of separate files/customize pdf saving directory in TeXStudio

1  Asked on June 9, 2021

### Key Word in Bibliography

1  Asked on June 9, 2021

### Caption package breaks tex4ht automatic sectioning pagination

1  Asked on June 9, 2021

### Receiving a wrong output from ref when ContinuedFloat is involved

3  Asked on June 9, 2021 by qaher

### Help Lines point of origin in tikz

2  Asked on June 9, 2021

### Linking to phantomsection with ref does not work in make4ht

1  Asked on June 9, 2021

### How to insert latex into confluence page?

1  Asked on June 9, 2021 by candic3

### How to make headers with tables and pictures?

1  Asked on June 9, 2021

### Simple implementation of the abs function by getting rid of or by consuming the “-“?

4  Asked on June 9, 2021

### Linespacing in algpseudocode

0  Asked on June 9, 2021 by lemonbonbon

### Why the style file mdpi.bst is not working properly in word (using bibtex4word plugin)?

1  Asked on June 8, 2021 by zhangxaochen