cancel
Showing results for 
Search instead for 
Did you mean: 

query regarding screen capture in webdynpro

Former Member
0 Kudos

Hi

i needed to use the java.awt.Robot class to perform a screen capture. This is basically used to capture signature which is done on a applet. But hwile i am using it gives me java.awt.headless exception which basically means that i cannot use display devices or certain other features. is there any way get past this.

Is there any way i can do a screen capture using webdynpro.

I have few more doubts regarding a application that i need to make. If i am not able to get a solution for this problem i would explain the scenario and probably someone could help me with solution for the same

thanks

regards

Srikumar V

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Srikumar,

In WebDynro you are not supposed to write client side code. So if you do a screen capture it would be the screen of the server which is normally not present/usefull.

What you want to achieve could be done best by taking the Graphics object of the Applet and send its data (eg. th bitmap with the signature) to a servlet.

Kind regards

Matthias

Former Member
0 Kudos

needed little more detail on the solution that you have mentioned.

see the applet i have has been embeded as iframe in webdynpro view

how do i get the graphics object of the applet and transfer it webdynpro.

i need to make the captured signature made available to another view from which this signature window is called. this calling view uses the signature and writes it onto a pdf.

i need clarifcation on how to make the grpahics object of the applet avaiable to the wbedynpro view that has embeded this applet as iframe

thanks

Former Member
0 Kudos

The problem is that the iframe control is not really supported and should not be used anymore i think.

But anyways: Since there is actually no out of the box solution, the steps you would hav to go are as follows:

1. Get Access to the image data (client side)

I suppose the paint method of one of the AWT/Swing components is overwritten to draw the signature with a pointig device (eg mouse/touch screen)

in the method public void paint(Graphics g) you have access to the component's Graphics object.

When the user presses a button in that applet you need to get the latest graphics object of the component and get the bitmap data out of it.

This is basically the same as using the java robot screenshot, just more elegant.

But it is important of course, that the navigation to the new view is somehow triggered by the applet so that it can send the request to the servlet before the applet is destroyed.

2. Send the data to the Server

I think the best would be to write a servlet to accept the bitmap data from the applet and store it to a database. When the File is uploaded you have to navigate to the next view (using portal navigation or javascript to reload the parent frame)

Then you need to query that database from Webdynpro to get the file.

3. Now you would have to use a library like iText to create a PDF file with your image in it.

This is all not really easy and I can only describe some rough ideas. I cannot think of an easier way to do it right now since client side coding is not supported by webdynpro.

Former Member
0 Kudos

i am getting brief idea how it is to be done. the pdf part i can get it done. it just that i needed to know how to get the signature as any form of object into webdynpro. i thnk ur solution basically is to write it onto a database and then access it.

what i was thinking was writing thw aignature as a image file and then read the same file from webdynpro.

thanks

Former Member
0 Kudos

is there any way to embed awt based control onto webdynpro without using iFrame.

as my requirement is to capture a signature and transfer it onto pdf. the pdf part i am clear of.

But since applet will not be supported or is not recommended is there any other way of doing this.

Former Member
0 Kudos

hello,

You said that you can deal with the pdf part.I am very new in webdynpro java. n I needed some help.I have some text.I want to save that text in pdf format and then when any user selects that file,it should be possible to open that file.

thanks in advance

Answers (0)