cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with PDF show

Former Member
0 Kudos

Hi

I have problem with show PDF file. I have tried with Adobe InteractiveForm in mode usePDF - that works but i can't close window with PDFView - when I close this window an browser error occurred. The second method which I have tried is the use of FileDownload element - that works but I must separatelly create PDF file and before that click the link (the filedownload element) - that displease me.

I am thankful

for any suggestion

Bogdan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

For showing a PDF file I would simply use an IFrame and give the filename as its source.

greetings

Walter

Former Member
0 Kudos

Hi Walter

thanks for your answer

but I have no file:( the PDF is created directly to context property (binary). I can't link this property with source property of IFrame (string). I can write the PDF to file but:

1. I think that thai is not elegant solution

2. i dont know where the file would be writen

regards Bogdan

Former Member
0 Kudos

Hi Bogdan,

If you write any file (without specifying any file path) then it will be written to the "$\usr\sap\J2E\JC00\j2ee\cluster\server0" directory.

You can create the file whereever you want in the local hard drive and you can create a HTTP alias and you can access the file using this alias.

If you require any further info, let me know.

Regards,

Santhosh.C

Former Member
0 Kudos

Hi Santhos

Thanks for your fast answer. I know the path to the file, but I can't convert it to URL :(. I know - that is serious education fault May be you know how can I make it?

Regards Bogdan

Former Member
0 Kudos

Have a look at the WDURLGenerator API.

Armin

Former Member
0 Kudos

Hi Bogdan,

1. Create the PDF file (eg. output.pdf) to some location in the server (eg: c:\bogdan\outputfiles)

2. Create a HTTP alias(eg. bogdan) in the Visual Adminsitrator pointing to the file location (eg: c:\bogdan\outputfiles).

3. Set the linkToURL reference property to http://<<servername>>:50000/bogdan/<<PDF file name>>

For creating the HTTP alias refer to the blog "Creating an HTTP Alias in WAS"

/people/renjith.andrews/blog/2005/03/31/creating-an-http-alias-in-was

Hope this solves your problem.

Regards,

Santhosh.C

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Thanks everybody for your help. The solution with iframe and file works, but i think, that is not good solution - communication between server and client via file. I think, I have found better solution:

byte[] pdfContent={here document is created};
IWDCachedWebResource pdfResource=WDWebResource.getWebResource
    (pdfContent,WDWebResourceType.PDF);
wdComponentAPI.getWindowManager().createExternalWindow(
     pdfResource.getURL(),"Report View",true).open();

no file needed und easy

once more thanks everybody

Best regards

Bogdan

BeGanz
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Bogdan,

bingo, using the IWDCahcedWebResource-API (Web Dynpro Binary Cache) is really the best solution.

A new Web Dynpro tutorial about exporting table data into Excel using the Web Dynpro Binary Cache service will be published on SDN very soon.

Regards, Bertram