I dint get one point in above query , if you wantto export data to PDF , why do you wantt o render it as HTML(or any other presentation file you are using).

Just put your HTML code generated in a StringBuffer and pass it to render() method of PD4ML class. The BYTEOUTPUTARRAYSTREAM recieved from this method can be passed to OUTPUTSTREAM and your PDF will be downloaded.