Unlesss your client doesn't pay you, using 3rd party will be alot cheaper than having you code it. When you say optimize I take it from your example that you mean smallest possible size and not fastest possible load time.
Ihave two thinks you should probably start with.
1) The should be pdf Linearized
2) The pdf should be compressed (PdfWriter.CompressionLevel = PdfStream.BEST_COMPRESSION)
Inorder to really "optimize" your PDF, you really need to know the PDF format
PDF Reference and Adobe Extensions to the PDF Specification [
^]
thus 3rd party maight be alot cheaper for your client.