Avatar

Level 1

Thank you, Nith, for looking at my problem.

Do you mean the scripting mehtod xfa.host.exportData?

As far as I understood, this can be used to export the data, but not to save the whole file as PDF.

My current solution looks like follows. I'm using the docReady event, to ask the user whether s/he wants to save under the same name or not

ServiceProcurementNotice::docReady - (JavaScript, client)

var

myDoc = event.target;

try

{var userSave = xfa.host.messageBox("Do you want to save changes to " + myDoc.documentFileName,"Save",2,3);

if ( userSave == 3 )

{

app.execMenuItem("SaveAs");

}

else

{

}

}

catch

(err){app.alert("Exception in save: "+err);}

This solution has the disadvantage, that the message pops up each time the pdf file is opened. I would prefer the message to come up only upon first usage, i.e. when all fields are still empty.

Judith