on 11-16-2005 10:33 AM
Hi,
Any pointers to documentation which shows step by step creation of a WD application, for downloading PDF using the FileDownload UI.
I have a WD application which calls a BAPI. This BAPI returns one parameter (BIN_FILE) which is of type XSTRING. This paramter contains the PDF content. I need to use this to be downloaded to a pdf.
Can anyone guide me how to do it. I used the recent posts for this but seems to loose track somewhere.
Regards
Puneet
Hi
create a context element of type binary for example FileDownload.
In doInit() metod:
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("FileDownload");
IWDModifiableBinaryType binaryType;
binaryType = (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
binaryType.setFileName("test.pdf");
binaryType.setMimeType(WDWebResourceType.pdf);
you xstring is for example "file"
try
{
int length =(int)file.length();
byte b[] = new byte[length];
b = file.getBytes();
wdContext.currentContextElement().setFileDownload(b);
}
catch(Exception ex)
{ }
Andrea
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.