cancel
Showing results for 
Search instead for 
Did you mean: 

Saving interactive form on hard disk

Former Member
0 Kudos

Hi,

I'm trying to save an interactive form on the hard disk of my pc using web dynpro for java

To save the form, I created the following code :

boolean ok = true;

// get date of today

byte[] bytes = wdContext.currentContextElement().getPdfSource();

try

{

File file = new File("C:
form.pdf");

FileOutputStream os = new FileOutputStream(wdContext.currentContextElement().getFile());

os.write(bytes);

os.close();

wdContext.currentDataSourceElement().setApproverComments("ok" + bytes.length);

}

catch (IOException e)

{

// e.printStackTrace();

wdContext.currentDataSourceElement().setApproverComments(e.toString()+ bytes.length);

* ok = false;*

}

return ok;

With this code, I don't receieve any error message but can't find the file on my hard disk.

Do you know where the problem could come from?

Thanks a lot for your help

Karim

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

The file will not be stored in your local system, it will save on Server system in specified location.

Use File download UI Element to download to your local system. or else, use the save button of interactive form.

Regards,

Naga

Answers (0)