With a few minor edits we've managed to take your PHP example code
and get it to generate a two-page PDF in portrait mode. It all works beautifully. Except for the design of the pdf-result. So I think I need som help:
I can see all the nice PHP functions in the documentation - like function setPageWidth($value) - but I have no idea where to insert these function snippets.
Can you help me on the right track. Or point me to a more elaborae example which includes functional adjustment. ?