You said you had difficulty formatting text. Here is a "hello world" pdf that just has these two words on a page: copy and paste this text (stripping leading spaces on each line) and save it in a .pdf file. Basically in order to write text you have to define a font (object 5) and then a stream with a Tf command to use the font, a Td command to position the text, and a Tj command to write it.
%PDF-1.2
1 0 obj
>
endobj
2 0 obj
>
endobj
3 0 obj
>
endobj
4 0 obj
>
>>
endobj
5 0 obj
>
endobj
6 0 obj
>
stream
BT
/F1 48 Tf
185 400 Td
(Hello World)Tj
ET
endstream
endobj
trailer
>