Usually we don't answer "GimmeCode" non-questions (this is not a question, because "can anyone… ?" cannot be counted as a question), but in this particular case, a purely technical/"scientific" answer is possible:
no one can give you such code by one principle reason: there is no unambiguous "conversion" from one to another, because the two kinds of object have different concept leaving no possibility for one-to-one correspondence. PDF file is something like an electronic paper, all data represented in a fixed way. An application window, in contrast, is fluid, it takes different shapes depending on screen and window size and the state of the application, entered data, and anything like that. The problem is just ambiguous.
It does not mean that the code doing something like this to meet certain requirements cannot be written. It's just that no one can give it to you based on your question. There are two flows of input needed to get to such a task: 1) your application itself, as it is before implementing such feature, 2) the mapping rules which would describe how the state of the application should be mapped on PDF output.
For creation of PDF, you can iText, or its .NET port, iTextSharp:
http://en.wikipedia.org/wiki/IText[
^],
http://itextpdf.com/[
^],
http://sourceforge.net/projects/itextsharp/[
^].
In included the reference to Java iText site as well, because most documentation is there. If you understand C#, it would not be difficult to understand Java-bases API documentation.
—SA