Creating PDFs from scratch can involve a lot of effort. You'll almost certainly find the easiest solution is to use a third-party PDF component, of which there are many available on the market today.
For the .NET Framework, ABCpdf, iTextsharp and PDFSharp should do the trick. All available for free*. Each component has strengths and weaknesses, so finding the best one for a particular task requires a little research.
You'll find each component offers a unique set of basic drawing commands. These enable you to construct valid PDF documents. They may also provide additional drawing methods for laying out documents, such as System.Drawing, PostScript, HTML & CSS, etc.
The following C# code shows how simple creating a PDF document can be...