Qoppa’s library jPDFWriter can be used from within a servlet. The sample creates a PDF document runtime and serves the document directly to the client browser, without using any temporary files on the server.

'
'.$f->get_tpl_var('file_display_name',$e).'
'.$f->get_tpl_var('file_display_name',$e).' '.((($f->get_tpl_var('file_post_id',$e)) && get_the_ID() != ($f->get_tpl_var('file_post_id',$e)))?('» '.__(__('Post', 'wp-filebase')).''):('')).'
'.$f->get_tpl_var('file_name',$e).'
'.((($f->get_tpl_var('file_version',$e)))?(''.__(__('Version:', 'wp-filebase')).' '.$f->get_tpl_var('file_version',$e).'
'):('')).'
'.$f->get_tpl_var('file_size',$e).'
'.$f->get_tpl_var('file_hits',$e).' '.__(__('Downloads', 'wp-filebase')).'
'.__(__('Details', 'wp-filebase')).'
'