I have a session maintained in my running web application. When i am trying to convert a jsp page to pdf with PD4ML the

values in the session are not shown. This i believe is because PD4ML creates a new session of itself. I tried setting the

session id of the pd4ml object to the one which is already have created but it is not working out.
This is my code..

JSP code
{code}PD4ML pd4ml = new PD4ML();
pd4ml.setSessionID(session.getId());
ITR1.runConverter(pd4ml,"../../../../../../html/tax/html/forms/ITR_1/ITR1PDF.jsp", new File(filename));{code}

Java code
{code}public void runConverter(PD4ML pd4ml, String urlstring, File output) throws IOException {

if (urlstring.length() > 0) {


java.io.FileOutputStream fos = new java.io.FileOutputStream(output);
if ( proxyHost != null && proxyHost.length() != 0 && proxyPort != 0 ) {
System.getProperties().setProperty("proxySet", "true");
System.getProperties().setProperty("proxyHost", proxyHost);
System.getProperties().setProperty("proxyPort", "" + proxyPort);
}

//PD4ML pd4ml = new PD4ML();

try {
pd4ml.setPageSize( landscapeValue ? pd4ml.changePageOrientation(

format ): format );
} catch (Exception e) {
e.printStackTrace();
}
JOptionPane.showMessageDialog(null,pd4ml.toString( ));
if ( unitsValue.equals("mm") ) {
pd4ml.setPageInsetsMM( new Insets(topValue, leftValue,bottomValue,

rightValue) );
} else {
pd4ml.setPageInsets( new Insets(topValue, leftValue,bottomValue,

rightValue) );
}
pd4ml.setHtmlWidth( userSpaceWidth );
pd4ml.render( urlstring, fos );
}
}{code}