ContentsQuick Start"Hello World!" - as a PDF document
Previous: "Hello World!" - as a web page | Next: Precisely print a square

"Hello World!" - as a PDF document

Now lets do something that's harder to do without the servlet utilities - generate a PDF page. JBuilder3 has no wizards to help with this one... but the changes to the previous code are minimal -> see the code

When you run the hello2 servlet and view it in your browser, what you'll get should be something like this.

Now here's what we did:

The examples assume that you are working with server-side Java, but notice that you can easily output the PDF to a stream or a file. Consequently, you can use PdfPage in an application instead of a servlet.


ContentsQuick Start"Hello World!" - as a PDF document
Previous: "Hello World!" - as a web page | Next: Precisely print a square