cancel
Showing results for 
Search instead for 
Did you mean: 

How to download the content to a PDF source file.

Former Member
0 Kudos

Hi All,

I am using FileDownload UI element in the ADOBE interactive to download the content to a PDF file.

Please help me how to download content to a PDF file.

Thanks,

Archana.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi Archana,

you will get the byte format of the pdf form the pdf source attribute , create a resource using that byte data of type pdf as following

IWDResource iwdResource = WDResourceFactory.createResource(wdcontext.currentContextElement().getPdfSource(), "resource name", WDWebResourceType.PDF);

create a context element say fileresource of type iwdresource.

set it's value as following.

wdContext.currentContextElement().setFileResource(iwdResource);

and do the following code on the action of the download button.

public void downloadFile( )

{

//@@begin createExternalPopup()

// get the resource from the context

IWDResource resource = wdContext.currentContextElement().getFileResource();

//create an external window. A download dialog should appear

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal()) ,"Title");

//@@end

}

with regards

shanto aloor

chintan_virani
Active Contributor
0 Kudos

Archana,

Try searching and it will help you. Anyways you can check below thread for some information on it.

Chintan