cancel
Showing results for 
Search instead for 
Did you mean: 

pdf disbaling end user to download or save

Former Member
0 Kudos

Dear friends

i have one appplication created in local webdynpro component and i have placed one pdf in mimes and now when users clicks on the pdf which is available in the form of link it will be opened and asks the optio if it is to be downloaded or saved .My client doesn't require this option of endusers not to save or download it to desktop or anywhere else.

How can i restrict pdf from saving or downloading it through webdynpro java coding.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185879
Active Contributor
0 Kudos

Hello Krishna,

If he is not interested to save the PDF, but he can view the PDF right?

in that case use the following code to open PDF.

IWDResource resource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(wdContext.currentPDFFileElement().getPDFString()),"PDF",WDWebResourceType.PDF,true);

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(resource.toString(),"PDF Window");

window.show();

Revert for any queries.

Regards

Nizamudeen SM

Former Member
0 Kudos

Hi

Thank you very much for the reply can you please tell me where i have to place this code and in which method.

former_member185879
Active Contributor
0 Kudos

Hello Krishna,

As you mentioned in your previous post, pdf which is available in the form of link it will be opened. So definitely there will be link to open the PDF. write the following code in the link which is used to open the PDF.

Regards

Nizamudeen SM

Former Member
0 Kudos

There is no such link whenever i use file download element itself shows as link.

0 Kudos

Hello Krishna,

Create a Button UI element called View PDF in View and create an action for that.

in that action write the code provided by Nizamudeen SM

revert back if you any quaries,

Thanks & Regards,

Bhargava.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use Adobe Interactive Form UI instead of File Download UI.

Bind the resource attribute that you are binding to File Download UI to Interactive Form UI .

The Interactive Form UI will display your pdf in the view instead of displaying a link for downloading

Regards,

Amol