cancel
Showing results for 
Search instead for 
Did you mean: 

How to save offline Interactive form.

Former Member
0 Kudos

Hello,

I followed this https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

to design an offline interactive pdf. After I deploy the DC, I get this exception:

WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode

In the template project I see the designed pdf (TravelRequest.pdf) under

TutWD_UploadDownloadInteractiveFormsrcmimesComponentscom.sap.tut.wd.uploaddownloadinteractiveform.UploadDownloadInteractiveFormComp

In my DC, I do not see my designed pdf. Do I have to manually save the designed pdf at this location. How should I save the interactive offline pdf under


"tempwebdynproweblocalLocalDevelopment~pdfdemo~<company>.comComponentscom.<company>.demo.OfflinePdfDemoComp"

Thanks

Tony.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have you set the Mode property of your interactive form UI element to "usePdf" ?

This mode value does not change the original PDF document. The data source and the template for the creation of the PDF document are ignored.

You must map the pdfSource property to the context element containing the PDF document (binary).

For this you have to convert existing PDF file into bytes and then set this value in the mapped context.

The application development can then access the binary file and download it to the local hard disk.

This is what is exactly being done in the link posted in your query. If you want to download an existing form for offline scenario, this form should be placed (manually) on the server folder from wher you may read it programatically (which is being done in the given example) and download for local editing.

In case, you are starting with generating the form online, you want to use the same form for offline editing, you should use the Save button from the Adobe Reader when displaying the form and save the PDF file locally. You may then upload it using file upload UI (post-editing).

Edited by: Anagha Jawalekar on Apr 17, 2009 10:29 AM

Answers (5)

Answers (5)

Former Member
0 Kudos

Were you guys able to resolve.? If so, could you pl share the solution?

Thanks

Former Member
0 Kudos

Hi Tony,

I am also Facing the same error despite of making all the above suggested changes.

Can u plz help me out on this.

Regards

Shruti

Former Member
0 Kudos

I still get the exception

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode 

StackTrace:

com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: Failed to  USEPDF
	at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:419)
	at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterApplicationModification(ClientApplication.java:1132)
	at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.afterApplicationModification(ClientComponent.java:895)
	at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doRespond(WindowPhaseModel.java:573)
	at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:152)
	at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
	at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
	at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
	at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
	at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
	at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
	at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
	at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
	at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
	at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
	at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
	at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
	at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
	at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Caused by: com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode
	at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:351)
	... 29 more

The pdfSource property is already assigned to the context attribute PdfSource of type binary. Mode is also set to usePdf.

Former Member
0 Kudos

Hello,

Binding the pdfsource property of the Interactive form UI element to a binary context attribute should take care of that error.

Regards,

Virag

Former Member
0 Kudos

Hi,

You can develop Offline interactive forms in two ways

1) Using Fileupload functionality which is explained in your tutorial.

2) Using Webservice through HTTP.

You are developing through fileupload functionality, so for this you need to have already defined PDF in your local desktop, then only you can upload the file using Binary attribute in context and this Binary attribute should be mapped to Pdfsource property of Interactive element.

Follow the tutorial in the following link, In which step by step procedure is explained with very less coding. You will come to an idea of offline and online scenario when you go through the tutorial.

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4fd2d690-0201-0010-de83-b4fa0c93e1a9]

Revert me if you have any doubts

Regards

Raghu