The usual way to create a complex file from a dumb device is to have most of the document already created and stored somewhere on the device. Then, the variable data is simply inserted into the document at predetermined positions. I've used this method to generate Autocad drawings and Excel spreadsheets using very simple software routines. The only gotcha is in the case where the document format includes a checksum to detect corrupted data. In this case, the software needs to generate a proper checksum as well. This gets a lot trickier, but it's still possible.
I agree with the others that a pdf file is probably the least useful format you could find.