cancel
Showing results for 
Search instead for 
Did you mean: 

Showing a PDF with InteractiveForm and IFrame components

Former Member
0 Kudos

Dear Experts,

For quite some time we were having several issues while showing PDF Files in WebDynpro Java Components because of different versions of Adobe Readers and mainly because of browsers. Finally I have read about the option to show PDFs using IFrame.

byte[] PDFFormContent = bytes;

IWDResource resource = WDResourceFactory.createCachedResource(PDFFormContent, pdffile.getName(),WDWebResourceType.PDF);

Now this is working for me with Google Chrome, Firefox and IE without a problem. But with different pc clients of my colleagues PDF files are forced to download,when the application is called, instead of showing the PDF file in an IFrame.

Which setting is deciding to whether download the PDF or showing it embedded? Is there any way to prevent this grammatically?

Thanks and Regards,

Koray

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Hi Koray,

you can do it this way:

String url = resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());

then set the url on the bound IFrame property and it should be shown inplace. For Download take the ordinal of "ALLOW_SAVE".

Regards

Tobias

Former Member
0 Kudos

Thanks Tobias. This somehow worked for a pc client and for another one not. I have no idea what further changes have to be made or which kind of dependencies are there regarding to the browser settings.

former_member191044
Active Contributor
0 Kudos

If you are allowed to, you could check Adobe settings on client side.

Take a look at this:

See also the official Adobe guide Acrobat Help | Display PDF in browser | Acrobat, Reader XI

Hope this helps.

Regards,

Tobias

Answers (0)