Download Interactive Form

Hello!
Can an Interactive Form be generated without displaying it?
I want to ge hold of the pdfContent byte[], but don´t want to display the form.
Thank you!
Ilona Seifert

Hi Ilona,
You can try with the following:
import com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.api.IWDPDFDocument;
import com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.api.IWDPDFDocumentCreationContext;
import com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.api.WDPDFDocumentFactory;
import com.sap.tc.webdynpro.basesrvc.util.IOUtil;
InputStream template = ... //your XDP file as an inputstream
String xmlData = ... //business data you want to merge your form template with
ByteArrayInputStream dataSourceInputStream = new ByteArrayInputStream(xmlData.getBytes());
ByteArrayOutputStream dataSourceOutputStream = new ByteArrayOutputStream();
ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
// convert InputStream to OutputStream
IOUtil.write(template, templateSourceOutputStream);
IOUtil.write(dataSourceInputStream,dataSourceOutputStream);
IWDPDFDocumentCreationContext creationContext = WDPDFDocumentFactory.getDocumentHandler().getDocumentCreationContext();
creationContext.setTemplate(templateSourceOutputStream);
creationContext.setData(dataSourceOutputStream);
creationContext.setDynamic(true);   //if you want to create dynamic interactive form
IWDPDFDocument pdfDoc = creationContext.execute();
  // create the PDF and store it as ByteArrayInputStream
  InputStream pdfInputStream = pdfDoc.getPDFAsStream();
Best Regards,
Ferenc
P.S.: If you use some older version and the "com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.api" package is not available for you, then you can do the same with the old "com.sap.tc.webdynpro.pdfobject.api" package

Similar Messages

  • How File Path will be decided for downloading Interactive form

    Hi,
    I have error like...
    java.io.FileNotFoundException: temp\webdynpro\web\local\DynPro6\Components\com.dynpro.DynPro6\PurchaseRequisition.pdf (The system cannot find the path specified)
    Can any busy suggest how the path will be decided for local and server ..
    Please helpme in that,
    Regards,
    Gurprit Bhatia
    Message was edited by:
            GURPRIT BHATIA
    Message was edited by:
            GURPRIT BHATIA
    Message was edited by:
            GURPRIT BHATIA

    Hi,
    Do review this Thread, I think this will help you.
    [Adobe Interactive Forms / Web Services - Connection query|Adobe Interactive Forms / Web Services - Connection query;
    Regards
    Pradeep Goli

  • Automate the download interactive form

    Hi all,
    I have designed a PDF file in tcode: SFP in order to take into account a table of data ..
    In the other side of my WEBDYNPRO application i display this table data in an  ALV
    and what i want is :
    When the user clik on a button, i want to automate the download of
    this file :(with taking into account its template + DATA issues from the ALV) .
    otherwise : to display the pop up of downloading the PDF file
    I do not want to navigate to an other VIEW that contain an interractive form which contain the template of the PDF
    So please if you have any idea, that will be helpful
    Best regards

    It solved now !
    Thank you Otto .
    1) note the execution FP_FUNCTION_MODULE_NAME and pass the form name to it. The parameter e_funcname will contain the name of the generated function module name fm_name.
    2) call function 'FP_JOB_OPEN'
    changing
    ie_outputparams = fp_outputparams
    exceptions
    cancel = 1
    usage_error = 2
    system_error = 3
    internal_error = 4
    others = 5.
    3) call function fm_name
    exporting
    /1bcdwb/docparams = fp_docparams " not obligatory
    Z_DATA = wa_vndbnk  " check the fm_name parametters
    importing
    /1BCDWB/FORMOUTPUT = fp_formoutput
    exceptions
    usage_error = 1
    system_error = 2
    internal_error = 3
    others = 4.
    4)  Close spool job
    call function 'FP_JOB_CLOSE'
    exceptions
    usage_error = 1
    system_error = 2
    internal_error = 3
    others = 4.
    5) finally call
      DATA pdf_stream TYPE fpcontent.
      pdf_stream = fp_form_out-pdf.
      cl_wd_runtime_services=>attach_file_to_response(
      i_filename      = 'PDF.pdf'
      i_content       = pdf_stream
      i_mime_type   =   '/Desktop').

  • How to download adobe interactive form layout

    Hi Experts,
        can any one  suggest me how to download the adobe interactive form PDF layout including  output values. when we download the form values are  not displaying.
    Thanks in advance.
    Edited by: krishnaveni.Nomula on Sep 28, 2011 4:44 PM

    Hi,
    We are  generating the form then adding values & want to save that form.
    Thank you.

  • Cannot save the Interactive form downloaded from abap webdynpro application

    Hello Everyone,
    Can anyone help me here.
    I have created an interactive form in SFP tcode and used in abap webdynpro application.
    scenario is i can downloade the form,fill it, sign it,save it and submit the form.
    Some thing is going wrong when i try to sign the form downloaded from the application.It is giving the error ->
    The document could not be saved. there was a problem in reading the document(26).
    When i try to sign the form save as dialog box will come where we can save the filled form.but here when itry to save it is giving above error.and also i cannot save thye form form file option.
    but form is working fine from sfp tcode not form application link.
    What is going wrong.Can somebody please help me here.
    Regards,
    Menaka.H.B

    Check the enabled and readOnly property of the InteractiveFormUI element in your application.
    enabled should be true and readOnly should be false.
    Also just FYI interactive forms are licensable in Productive environment for which you need Adobe Credentials. You may contact SAP Account Manager and Note 736902 for it.
    Chintan

  • How to download interactive adobe form with filled data

    Hi Experts,
    i have created a module pool program that is showing interactive adobe form, i created a button 'SAVE' to download the interactive adobe form to the presentation server.
    but the problem is that i am unable to save the interactive adobe form with filled data. Please provide me the code how to download interactive adobe form with filled data.
    Please provide me valuable information to clear the issue.
    Thank you,
    B. Raghu Prasad.

    Hi Raghu,
    is this adobe form in web dynpro ? if so, I suggest to go to [Web Dynpro |Web Dynpro ABAP; forum to get more advice because it seems to be more specific topic.
    Regards,
    Vincent

  • How to download interactive adobe form

    Hi Experts,
    could you please tell me how to download interactive adobe form with filled data through report program (not by WebDynpro ABAP).
    Note:- The downloaded form should be static.
    Thankyou,
    B. Raghu

    Hi,
    look at the example report FP_TEST_00 in the workbench.
    Steps to generate an adobe form:-
    First get name of the generated function module
    CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
    *open the form for printing
      CALL FUNCTION 'FP_JOB_OPEN'
    Now call the generated function module
      CALL FUNCTION fm_name
    Close spool job
      CALL FUNCTION 'FP_JOB_CLOSE'
    Steps to download the adobe form on your PC:-
    convert the pdf into a binary file
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    *download the form on your PC
      CALL METHOD cl_gui_frontend_services=>gui_download
    Regards
    Manisha

  • I am trying to use a interactive form and it says "If this message is not eventually replaced by the proper contents of the document, your PDF  viewer may not be able to display this type of document."  This is a IRS form and has worked before.

    I am trying to use a interactive form and it says "see below"  This is a IRS form and has worked before.
    is there a tech support phone number?
    Please wait...
    If this message is not eventually replaced by the proper contents of the document, your PDF
    viewer may not be able to display this type of document.
    You can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by
    visiting http://www.adobe.com/go/reader_download.
    For more assistance with Adobe Reader visit http://www.adobe.com/go/acrreader.
    Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. Mac is a trademark
    of Apple Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries

    That means you are looking at the form online with a browser that uses its own (incompatible) PDF viewer, not the Adobe Reader plugin.
    Either
    download the form to your local disk and fill it from there
    use a browser that employs the Adobe Reader plugin
    configure your browser to use the Adobe Reader plugin: http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • Questions About Interactive Forms

    I have a project that reqires an application and background check authorization. I want to have these forms on my website as an interactive form that can be opened by a potential applicant, filled out on their computer and submitted back to me. I want to receive the completed application back in PDF form filled out and with a signature.
    What do I need with my website and background apps to make this happen. Do I need some type of server application to make this happen.
    Next, what are the accepted ways of having a document/application signed by an applicant and delivered to me digitally.
    Thanks

    George
    Thanks for the quick reply. If it's an e-mail would I receive the actual
    form used or just the content the applicant input. I would want the actual
    document with a signature. If storing on my server would it be the document
    and input if so that would be a better option so I could download and print
    out if needed.
    A digital signature field I would trust would be the way to go for us.
    Here's a synopsis of my needs.
    I am hiring guys to play the role of Santa and make phone calls to children
    at Christmas and I need a multi-part  application so I can have background
    checks run so I have an extensive multi-page application and contract plus
    background check authorization already designed in PDF form but this last
    year we had to e-mail it and wait for US Postal delivery of the completed
    application and I want a streamlined online way to handle the application
    and hiring process because I will have 75 - 100+ possible applicants this
    year.
    Barry Whitten
    PRIVILEGED & CONFIDENTIAL COMMUNICATION CONTAINING COPYRIGHTED INFORMATION
    This e-mail message (including any attachments) is proprietary or privileged
    and intended only for the named recipient(s).  It may contain material
    including photographs, designs and or illustrations that are covered under
    federal copyright laws and as such is privileged and confidential. Any
    photographic works, drawings, illustrations or files contained herein are
    the sole property of the sender and may not be used, either commercially or
    non-commercially nor distributed without senders written approval and full
    payment of any fees due.
    No one other than the named recipient(s) may read, copy, rely on, redirect,
    save or alter all or any part of the message, or any attachments, in any
    way.  If you have received this message in error, please Notify us
    immediately by return message so that we may arrange return of the
    document(s).
    This email was scanned for viruses prior to sending.

  • Interactive forms takes too long to load - sometimes crashes reader.

    Hi Gurus,
    I'm just wondering if anyone have this problem?
    I just configured ADS and created a sample WD program to display an interactive form, the form is not complex, only 2 text fields and an image.
    But when I deploy or run the program, the interactive form container hangs and take very long to process before displaying.
    After I save the PDF file to a local drive, when I try to open it, it will take very long and sometimes crash my system.
    Even when I click on "PDF Preview" to view the form in NWDS it take very long too.
    At first I thought it could be due to my system and I open downloaded PDF file on other PCs, but the problem occurs too in those PCs.
    Using Acrobat Reader 8.1.2, then downgraded to 8.1.1, still no avail.
    Everytime I open the PDF or WD loads the PDF, when I check the Task Manager the process of AcroRdr32 will hog the system processes and use up the memory. I have no problems with other PDF files, only those generated by the WD application gives problems.
    Someone hit the same problem? Any advise? Could it be the ACF or Adobe lifecycle issues?
    Please help. Thanks for all answers.
    Best Regards,
    Jansen

    Hi Jansen,
    If you are using Adobe Reader 8.1.* or above and activex controls in your form, you need to install the latest version of ACF and that will resolve the issue. And do remember to uninstall your old version of Adobe Reader first and then install Reader 8.1.* freshly and after installing it proceed with ACF installation. You have to follow the sequence.
    For ACF installation you may read  Note 766191 - Active Component Framework Installation.
    ACF Installable:
    https://sapmats-de.sap-ag.de/download/download.cgi?id=F9RUZ3Q7TERUBSMHSXWT3UMEM59IJYIPA931VQD32A1UNAKZ6B
    Do reward points if found helpful.
    Regards,
    Arafat

  • How to use an Adobe interactive form in an Application service operation?

    Hi,
    I have a peculiar requirement here:
    The user wants that on the trigger of a specific operation an operation of the Application service should get invoked: this operation should pick up a Adobe form template from a destination and then prefill this forms with some values and then store the same in the backend DMS.
    It's very easy to accomplish this task in WD Java with the use of Interactive form element but here we don't want any kind of user interaction for these forms, just the form templates will be prefilled with some dynamic values and then the same will be saved as is.
    Can some one please provide some insight into how the same can be acieved, any API's etc?.
    Please reply ASAP.
    Regards,
    Manish

    hi
    try this tutorial on
    online interactive
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on online interactive pdf form - 29.htm
    for offline interactive form
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on offline interactive pdf form using download - 30.htm
    for downloading and uploading pdf forms
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on offline interactive pdf form using e-mail - 31.htm
    regards
    saravana

  • Uploading data from Interactive form in Webdynpro ABAP

    Hello All,
    I am uploading data from an Offline interactive form to an ABAP WebDynpro application. Form is first downloaded, data is filled and now I am trying to upload the form to another WebDynpro application. Form DataSource is mapped to Context node with same data structure. However when I upload the form, form data does not pass automatically to specified context node.
    Do I miss any important step in between? I am on SAP NetWeaver 2004s SP10.
    Thanks,
    Nitesh Shelar.

    hi,
    the data is automatically passed to the context when the "interactive form" UI element is there in the view.
    when you just upload the pdf, just like that, it will treat it like a PDF file, not an interactive form....
    try using the same interactive form which you used to create the offline form.
    i hope this helps,
    regards,
    -ag.

  • Problem in accessing the Interactive forms in an ISR Senario(like MSS)

    Hi all,
    I am facing a problem whenever I try to access the interactive form.I am doing this from the standard Business Package, MSS.
    I have done all the configurations needed for these ISR Senarios.
    I suspect the the error is because of some missing IMG customizing.
    Pls provide some directions to solve this problem.
    Exception 1)
    initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.exceptions.PDFDocumentCreationException: ../../sap.com/pcui_gpisr/IsrForm/wd_key13_1171540676406/Error+PDF.pdf?sap-wd-download=1&sap-wd-dl_behaviour=1&sap-wd-cltwndid=DefaultExternal1171589446921&sap-ext-sid=dIiSA97eM6QRuNvwpwdigw%3D%3DzPkd%2BOwplNQFa31FtlR6vA%3D%3D%2Fpcd%3Aportal_content%2Fcom.sap.pct%2Fspecialist%2Fcom.sap.pct.erp.busunan.bp_folder%2Fcom.sap.pct.erp.busunan.roles%2Fcom.sap.pct.erp.busunan.business_unit_analyst_20%2Fcom.sap.pct.erp.busunan.business_unit_analyst_20%2Foverviewfolder%2Fcom.sap.pct.erp.busunan.overview_2%2Fcom.sap.pct.erp.busunan.masterdata_1%2Fcom.sap.pct.erp.common.isrform_page%2Fsap.com%2Fpcui_gp%7Eisr%2FIsrForm%2Fbase&sap-wd-norefresh=X&sap-ep-version=7.00.200611091758
    Exception 2: This Exception occurs when I try to run the application(sap.com/pcui_gp~isr/IsrForm) from the Webdynpro Content Administration Screen.
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: No scenario specified
    at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
    at com.sap.pcui_gp.isr.isrprocessevent.init.VcISRInit.onBeforeOutput(VcISRInit.java:228)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInit.onBeforeOutput(InternalVcISRInit.java:181)
    at com.sap.pcui_gp.isr.isrprocessevent.init.VcISRInitInterface.onBeforeOutput(VcISRInitInterface.java:139)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInitInterface.onBeforeOutput(InternalVcISRInitInterface.java:136)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInitInterface$External.onBeforeOutput(InternalVcISRInitInterface.java:212)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.callOnBeforeOutput(FPMComponent.java:602)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:568)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:437)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:195)
    at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:429)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
    Thanks in advance,
    Sethu

    Hey Sethu,
    Check the QISRSCENARIO settings.Also make sure that your ADS is configured.
    Also, please make sure that you have maintained all the settings which are mentioned in this link.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/3b/52dd3747934311abee4376f383fdf2/frameset.htm
    Regards
    <i><b>Raja Sekhar</b></i>

  • Creating Adobe Interactive Forms in ABAP Web Dynpro

    Hi,
    I am a begineer to ABAP PDF Form development. Anyone could help me to develop Adobe interactive forms (online and offline cases) using ABAP WebDynpro. I would need Thanks.step by step procedures to develop quickly. I have found the material mostly related to Java. Please suggest some links related to ABAP WebDynpro. What aee the methods that would be called to update a form, open a form and upload/download a form.
    Regards,
    Namita Bhan

    http://www.sdn.sap.com/irj/scn/interactiveforms-elearning
    the above link helps you out witht he best e learning sessions
    http://wwwimages.adobe.com/www.adobe.com/enterprise/partners/pdfs/solution_in_detail_interactive_forms.pdf
    this also is a very helpful document
    If you have any specific queries please feel free to shoot
    Cheers
    Senon

  • Error in deploying interactive form

    hi,
    When I am deploying a webdynpro application with interactive form  Ui element I get the error
    Exception Stack Trace:
    com.adobe.ProcessingError: Render produced no results, though no error was reported.  Please check your input files.
         at com.adobe.ads.request.RemoteRenderer.processRenderResults(Unknown Source)
         at com.adobe.ads.request.RemoteRenderer.renderAllRemote(Unknown Source)
         at com.adobe.ads.request.RemoteRenderer.renderAll(Unknown Source)
         at com.adobe.ads.request.RemoteRenderer.renderAll(Unknown Source)
         at com.adobe.ads.request.Renderer.renderWithoutCache(Unknown Source)
         at com.adobe.ads.request.Renderer.execute(Unknown Source)
         at com.adobe.BaseADSRequest.doWork(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         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:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
         at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:356)
         ... 29 more
    <b>Should I explicity import any external jar files.
    If so ,please give me the link to download the jar files.</b>
    Thanks,
    shamila.

    Hi,
    May be this link might be helpful to you...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/how%20to%20troubleshoot%20the%20render%20exception.pdf
    Regards,
    <i><b>Raja Sekhar</b></i>

Maybe you are looking for

  • Problem in Jndi lookup for  ITaskService

    HI, I am trying to initiate oracle bpm Human task programatically by using Java remotely. for this I am using following JNDI lookup for ITaskService. Hashtable ht = new               Hashtable<IWorkflowServiceClientConstants.CONNECTION_PROPERTY,java.

  • Packet queue strategy & data structure

    Hi all, does anyone know an efficient data structure to implement a global packet queue in which packets from different connection are queued (by a thread) and removed by another thread ? The basic idea is to have the following 2 threads (in pseudo c

  • Sort bookmarks by name?

    How to sort all the bookmarks in menu & sidebar by name?

  • CRM - Mass creation of Funds

    I posted this quesion under ABAP general but no any response. I am posting it here to see if i am lucky: I want to use Function module "CRM_FM_FND_MASS_CREATE_FND" to create fund and budget. I don't want to create funds plan. I followed the sample pr

  • IMPORTING FLASH FILE IN CAPTIVATE

    Hi! I have an interactive training module created with Flash. It has buttons, videos, and quizzes. Now, to make it compatible with SCORM. I was advised to use Captivate. Is it possible to export the whole flash file in Captivate? Please help. Thank y