cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe problem

david_fryda2
Participant
0 Kudos

Hi everyone,

I created an interactive form in my view.

I filled some data in data interactive form : for example an name.

I created a context attribute for that name.

I also created a submit button in that PDF that saves this file as pdf.

Here is the code for saving the file :

<code>

File file = new File("

server
BTS_FILES
CONVERSIONS
PORTAL
"

+ wdContext.currentDataSourceElement().getZehut()

+ ".pdf");

//write binary to file

FileOutputStream fos = new FileOutputStream(file);

fos.write(wdContext.currentContextElement().getPdfSource());

fos.close();

</code>

When the user runs the application again I want to load in that interactive form the data already inserted (the name).

Here is the code :

<code>

File file = new File("

server
BTS_FILES
CONVERSIONS
PORTAL
"

+ wdContext.currentDataSourceElement().getZehut()

+ ".pdf");

if (file.exists())

{

long length = file.length();

byte []binary = new byte[new Long(length).intValue()];

//read binary from file

FileInputStream fis = new FileInputStream(file);

fis.read(binary);

wdContext.currentContextElement().setPdfSource(binary);

fis.close();

}

</code>

PdfSource is an attribute created in the context as binary and it is bound to the attribute pdfSource of the interactive form.

The problem is that name is empty.

How is it possible ?

Thanks.

Regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

how was ur problem resolved, pls share........ I'm facing a similar issue