PdfSource content of interactive form in Java Web Dynpro

Hi All,
I am using Java web dynpro with interactive form. When I display the contents of the pdfSource of the interactive form into a text file, I see the following which is not a true binary content. Could u please let me know why the content is represented in the form other than binary?
%PDF-1.6
%âãÏÓ
153 0 obj<</First 973/Length 1717/Filter/FlateDecode/N 120/Type/ObjStm>>stream
xÚ´XɎ 7 ý C"î ` p¼ lǃ™É) „¶D˂%õ Õšxþ>¯š¤ä‰›´/9±EV½*¾zÜd gŽyÍ Â0Á™0
0000000153 65535 f
0000000154 65535 f
trailer
<</Size 156/Root 1 0 R>>
xref
0 0
trailer
<</Size 156/Prev 32208/XRefStm 2120/Root 1 0 R/Info 3 0 R/ID[<991012CC1DD111B20A00FFBFDB48FD64><991077C51DD111B20A00060100000680>]>>
startxref
35372
%%EOF
Thanks & Regards,
Jyoti

Hi Naidu
I have written the contents of the pdfsource to a file in the server using the below code:
byte b[] = wdContext.currentContextElement().getPdfSource();
File file = new File("C:
Severance.pdf");
long length = file.length();
FileOutputStream os;
try {
     os = new FileOutputStream(file);
     os.write(b);
     os.close();                         
catch (Exception e)
     // TODO Auto-generated catch block
     wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess("Some Exception "+e);
     e.printStackTrace();
And i have added a File Download element in the Application and have implemented the below piece of code for it:
IWDAttributeInfo attInfo = wdContext.currentContextElement().node().getNodeInfo().getAttribute("ctx_downloadpdfsrc");
ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType) type;
binaryType.setMimeType(WDWebResourceType.TXT);
String fileName ="C:
Severance.pdf";
// path to the source file
/* converts the binary file to a byte array and moves it to the text element */
try
      File file = new File(fileName);
      FileInputStream in = new FileInputStream(file);
     ByteArrayOutputStream out = new ByteArrayOutputStream();
     int length;
     byte[] part = new byte [10 * 1024];
     while ((length = in.read(part)) != -1)
           out.write(part, 0, length);
      in.close();
                          wdContext.currentContextElement().setCtx_downloadpdfsrc(out.toByteArray());
catch(Exception e)
                          wdComponentAPI.getMessageManager().reportSuccess(" !!!!!!!!!!!!! "+e);
                          throw new WDRuntimeException(e);
Other than this, if we simply write this line in the code it will display the entire content of the pdfSource on the screen when deployed:
wdComponentAPI.getMessageManager().reportSuccess(wdContext.currentContextElement().getPdfSource().toString());
Regards,
Jyoti

Similar Messages

  • How to create table in interactive form via Java Web Dynpro

    Hi,
    How to create table in interactive form via Java Web Dynpro ?
    Any online tutorial / example ?
    Thank you.
    Regards,
    Eric

    Hi Eric,
    Just choose the UI element Table from Form Library and drag and drop it on the form. now choose the no. of rows and columns and other settings you want about table from the wizard initiated through this process. This all is what you have to do to create the table. Now to bind it to the fields of the data source bind the individual colums to individual attributes of the node in the datasource.
    Hope it will solve your query.
    Regards,
    Vaibhav Tiwari.

  • Are ZCI interactive forms available via Web Dynpro for ABAP?

    Note 955795 talks about ZCI forms available via Web Dynpro for Java. Is this kind of forms also available via Web Dynpro for ABAP?.
    Do ZCI interactive forms work via Web Dynpro for ABAP without the need of ACF?
    If available, which support package levels are required?
    Regards

    Hi Mahamed,
    I got your problem. You have not done anything wrong.
    It is WebAS version which is not supported for this functionality.
    But there is solution to this problem
    Please refer to the SAP Note number - 1055738.
    I think you will get the answer and the scenario described there will match your requirement.
    This is a know issues with WebDypro ABAP but this works fine for Java Web Dynpro.
    I have also tried for 2 months but finally came to know about it.
    Regards
    Satya

  • How to combine two or more adobe forms in Java web dynpro

    Hi All,
             I have a scenario where I have few screens each  - a separate adobe form. For e.g. One adobe form for item creation, one fore details, one for planning. I need to combine all this into one and save a copy of the PDF.
    Save PDF option is present in the adobe options but it saves only the current form. I want to combine few forms and save the whole thing into 1 PDF document. Is there anyway we can do this?
    I am using web dypro java for Adobe forms on NWDS 7.0
    Adobe Live cycle designer - 7.1
    Adobe Reader - 8.1
    SAP NW SP 12
    PLease help!
    Thank you,
    Vasu

    Hi Amit,
    Thanks for the response but my requirement is different.
    I have to combine the contents of three PDFs (different adobe forms in different views in one web dynpro component) into one PDF ( a separate Adobe Form in different view in the same web dypro component).
    I would be glad to know if you have a solution for such scenario. I am working on this since 4 days with no solution yet.
    Thank you,
    Vasu

  • 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

  • Urg : adobe interactive form creation using Web dynpro with ABAP

    <i>Hi Floks,
    Thank you For Your support and view my Quires.
    I need helpful answer Regarding this Question . I need to Create custom ADobe interactive Form with WEB dynpro ABAP .Could please help out and give me what are the step can i followed here (Ex) .
    Good rewards for best Answers.
    Thank You,
    Suresh Duvvuri</i>

    please check this link:-
    step by step it is explained
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3
    All the best,
    Mahesh.gattu

  • Submit button in interactive adobe form in abap web dynpro

    Hi can anyone help me out to know hoe to use the submit button in adobe interactive form in abap web dynpro .
    Iam creating a adobe form abap web dynpro . There i need to use the submit button to trigger some action in the adobe interactive form .
    So i need to know how to use the submit button and coding for that in the abap web dynpro .
    Vighnesh

    Hi Michelle,
    Could you tell me how you resolved the problem - as I'm facing exactly the same issue!
    Many Thanks
    Christine

  • What is the right  way to display a table in Java web dynpro using a node.

    Hi experts,
      I am trying to show a node of cardinality 0...n as a table in an adobe form in Java web dynpro. But its not showing it properly. Can anybody please tell me what is the right way to display a table on adobe form using a node of cardinality 0...n or 1...n in Java Webdynpro.  In ABAP webdynpro, we can drag and drop a node of cardianlity 0...n or 1...n to  show as a table and it works fine. Is the same possible in Java webdynpro also. Please help.
    Thanks and Regards.
    Vaibhav Tiwari.

    Please refer to my post.. you will get the answer
    Dynamic Table -  same data repeating in all rows
    Special care should be taken in designing the context for table attribute.
    The attribute type singletone also plays a important role. I have this doubt from the beginning when you have reported this problem for the first time but finally you marked it as solved so i thought there might be some other issues but again when you reported that again i did some analysis.
    Now coming to final solution :
    For designing a table in adobe interactive form you have consider following
    You have to design the view context upto three level, I am explaining you the properties
    PDFDataSource (Parent Level1) - Cardinality 1:1 - Signetone -True - This is assigned to datasource
    TableList (Parent Level2) - Cardinality (1:1) - Signetone -True
    TableWrapper(Parent Level3) - Cardinality (0:n) - Signetone -True
    TableData (Parent Level4) - Cardinality (0:1) - Signetone - false (This is the main point)
    Then under TableData value node, you have to put all your table attributes.
    This Value Node name can be anything but hierarchy should be same as I have mentioned above.
    Please try out these steps and get back to me if you have any doubt.

  • Sending java web dynpro interactive form as pdf attachment from Business WF

    Hi,
    I have a java web dynpro application with interactive form(online), on send button click i need to send the filled form as an PDF attchment to internet mail id. I am using SO_NEW_DOCUMENT_ATT_SEND_API1 inside workflow to send attachment. My custom RFC which is interacting with WD app is getting the pdf source context attribute(simply i set the import parameter with that attribute and no juggling is done) as import parameter which  is of type XTSRING. Once i execute the application i am getting mail with attachment as pdf but i am not able to open the pdf. It is of just 1 KB size. It seems my pdf source context attribute is not sending data. Can some one suggest how can i solve this.DO i need to convert the data to pdf format before sending or any otgher thing i need to do.
    Regards
    Ravindra

    I did that before posting the question itself (enables = false), it doesn't work. It just disable the extra features like digital signature and stuff.  Interesting thing is all our HCM forms developed for HR actions works fine with out any issues. Why the interactive form developed with WDJ is not working and it requires credentials??. The same form works fine if I deploy the application directly into server but it throws the error if I check in through NWDI ..
    If you look at the server location it has the file but it throws the error:
    Caused by: com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: IOException occured while creating template stream from the TemplateSource : .\temp\webdynpro\public\sap.com\ess~ben\webdynpro\Components\com.sap.xss.hr.ben.reviewtable.VcBenefitsReviewTable\ReviewTableView_InteractiveForm_Review.xdp (The system cannot find the file specified)
    Please advise.
    Thank You,
    Hari.

  • Adobe Interactive Forms by using Web Service

    Hi Experts,
    Can we create adobe forms by using web service????...
    Please give me the steps to achieve this.
    Please help me out on this.
    Thanks in Advance,
    Praveen

    Hi Praveen Kumar  ,
    Check the following websites which contain examples on Adobe Interactive Forms by using Web Service:
    https://www.sdn.sap.com/irj/sdn/adobe
    Improving the Performance of Adobe® LiveCycleu2122 Designer Forms(scripting)
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_perf_guidelines.pdf
    Interactive Forms Based on Adobe Software: Overview
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e635e290-0201-0010-a9be-9e8e4ce04770
    Adobe Interactive Forms
    http://www.saplounge.be/Files/media/pdf/Huberland-Interactive-Forms-2007.10.10.pdf
    Taking interactive forms to next level
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8c103c36-0301-0010-cda8-f6b381bedb6e
    Introduction to Adobe PDF Library SDK(PDFL SDK)(Simply scroll the document)
    http://partners.adobe.com/public/developer/en/webseminars/PDFL_WebSeminar.pdf
    Creating Interactive forms in webdynpro for java
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1
    PDF-Based Print Forms/SAP Interactive Forms by Adobe
    http://help.sap.com/saphelp_nw04s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm
    Date Objects in Adobe Designer
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/60694fddb74ad88cdb7d2a094f3dd2/frameset.htm
    Checking and Testing a PDF-Based Print Form
    http://help.sap.com/saphelp_nw04s/helpdata/en/c2/1fe9aa4d7b413e8515f90b73729e97/frameset.htm
    Architecture
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/21021b911f4c0cae11459a4ce0bc62/frameset.htm
    http://www.nl4b.com/Adobe/Invitation_SAPBrussels_Q407.pdf
    cheers!
    gyanaraj
    ****Pls reward points if u find this helpful

  • Connecting to R/3 System through Java Web Dynpro forms.

    Hi,
    I have a requirement in which I have to send data to R/3
    from Java Web Dynpro screens.
    I will design the Java Web Dynpro screens and write a RFC Model.
    I will write a RFC in se37 which will connect to the RFC Model.
    Before creating the RFC in se37, I will create ztables in se11.
    I will write a ABAP Report to see that all data enters the ztables.
    I need some guidance with regard to this.
    Do, the RFC Model have the access of the ECC(R/3) System.
    What are tasks to be told the Basis guy so, that RFC being called from through Java Web Dynpro?
    Please provide me some documents with regards to this scenario.
    Regards
    Neha Singh

    Hi Neha,
    The steps you provided is clear enough to connect to a R/3 system through the WD forms.
    On creating the model you need to give two inputs such as
    logical system name for model instance
    logical system name for RFC metadata
    there will be 2 default values, also you can create your own JCOs in the <servername>:<port>/devinf of the server or u can ask your basis team also.
    Before creating the JCO , the SLD (System Landscape Directory) needs to be configures, that your basis team will know.
    other than that once you create the functional module in se37 make it RFC enabled , and once you import the RFC model , you can give your ECC system user name and password and search for RFC you have created from the list of RFC.
    Regards,
    Sam Charles J.

  • Java Web DynPro and Universal Worklist Interaction

    HI ESS/MSS Gurus,
    Good day!
    I am a workflow consultant who is working on an ESS/MSS project. I have already completed and tested (successfully) all of the workflows needed in the backend using the PTARQ and PTCOR applications. We are also successful in showing the work items in the universal worklist.
    Now the question is, whenever we click on the work item, we encounter an error in the portal. Now, I need to determine the following:
    1. How are we going to integrate the ESS/MSS portal with the execution of the work item in the universal worklist?
    2. Do we need to develop custom Java web dynpro applications for the approval process of the leaves, or is there a standard offering from the ESS/MSS packages?
    Your inputs are very much welcome.
    Regards,

    Hi Gurus,
    Here is what we have done so far:
    1. Implemented the details as indicated in note 779075 and changed the parameters defined in SWFVISU
    2. Upon re-registering and clearing the cache from the UWL, we tested if the task will call the standard application for leave request approval. It returns the error Internal error. :
    Item is null for action acknowledge, and for item type uwl
    It seems that the xmls files are not being generated or read successfully. although when we check uwl.webflow.SAP_ECC_HumanResources, there is an updated xml file for the task
    Questions are:
    1. What checks do we need to execute between the back end, UWL and portal?
    2. Whenever changes in SWFVISU are made, what items do we need to check to ensure that the changes are reflected in the UWL? I have read that SWFVISU helps the user do away with the tedious xml creation. How can we verify that the changes are implemented/updated in the xmls generated?
    3. Any other items we need to look into?
    Regards,

  • Java Web Dynpro Curriculum

    Hi experts,
    Can anyone provide me Java web dynpro curriculum.
    Regards,
    Muhammad Imtiyaz

    hi
    check the curriulum for java webdynpro
    /people/mark.yolton/blog/2009/02/25/professional-skills-certification--your-golden-ticket-to-project-career-success
    /people/marcel.salein/blog/2008/04/26/sap-education-program-and-a-visual-composer-certification-at-teched14608
    /people/community.user/blog/2006/09/01/web-dynpro-abap--training-is-now-available
    /people/r.eijpe/blog/2008/03/07/sap-interactive-forms--complete-training-curriculum
    http://wiki.sdn.sap.com/wiki/display/EP/Main+Page
    http://wiki.sdn.sap.com/wiki/display/profile/johann+Marty
    Thanks

  • Unable to download file from FileDownload UI Element - Java Web Dynpro

    Hello Experts,
    I am facing a strange issue.Scenario is:
    I created an java web Dynpro application (Please note that it is just a standalone WD app, not integrated in portal) with just one FileUpload UI Element ,one FileDownload UI element and one button (for triggering an action).
    I browse a file (e.g. text,pdf,doc etc.) and click on button. It uploads the file and when I click on download, there are two cases:
         1) Simply click on download does not downloads the file and shows error: "Unable to download <file name> from <server name>.  Unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later." Though it is opening the file,showing the content.
         2) I opened that portal URL in a new tab in same session and logged in with a portal user. Now if I click on download link of same WD app opened in different tab of same session, it downloads the file without any error.
    I am using portal 7.0
    Can somebody point what's going wrong with case 1?
    Helpful pointers will be appreciated.
    Thanks,
    Kirtiman

    Hi Sid,
    I did not gave any authentication of WD app as it is anonymous app. There is no parameter set in application properties.
    As I run the app, it is showing the initial screen with UI elemtns and till upload works fine,.It has to be an anonymous app, so cannot ask for credential from user.
    Thanks
    Kirtiman

  • Problem in submit button on adobe form integrated with web dynpro

    Hello,
    I'm facing prob in triggering web dynpro event onSubmit for Interactive form.
    I've created a submit button from web dynpro activex pallete on adobe form (integrated with web dynpro) to send the form as email.
    Then in the web dynpro view where this form is embedded i have created an action against onSubmit event and called a method within this.
    However, on clicking Submit button this event is not getting triggered.
    Please let me know what is lacking in this process?
    Thanks.

    Hi,
    I am also facing the same problem. i have developed a simple scenario under which user have to input his/her details and on submit button it will be updated to database.
    I have tried the above solution but after adopting this solution all the editable fields become non-editable.
    so the above solution is not working for me could you help me out.
    I think ... try this....
    When you create the Adobe Form from WebDynpro, you need to follow one step in SFP Transaction or inSE80 transaction. Open the Adobe Form in any one the transaction and now in SAP menu bar "Utilities" in that you will find the "INSERT THE WEBDYNPRO SCRIPT" just click on that one. Then you will see a new Script Object is being created with the name "ContainerFoundation_JS" under the "Variables" in the Heirarchy of the Object Pallete of the Adobe Form.
    This step is mandatory to use the SUBMIT Button of the "WebDynpro Native", to trigger the OnSubmit event of the WebDynpro.
    Thanks
    Edited by: shailendra2sap on Mar 6, 2009 12:24 PM

Maybe you are looking for

  • Change a color in an image

    I am using getPixel() and setPixel() to process the whole image to change one of the colors, is there more efficient way to do that with 2D or Jai? thanks.

  • Workers in AIR Application

    What is the workflow for creating and using workers in an AIR application? I can't import "flash.system.MessageChannel" nor "flash.system.Worker". The Worker class, used to create the messageChannels (e.g. Worker.current.createMessageChannel(worker))

  • Raw and IPhoto

    How do you deal with raw? I must use Capture one because of I Photo deficiencies.

  • Desktop 6 software won't work with media card, but phone works with card just fine.

    Pearl 8110 media card transcend 8G HC using latest software update for desktop and phone. Vista business Since upgrading to desktop 6 several months ago I can't upload media to my phone.  Windows does not recognize the media card as another drive. I

  • CSS Sorry Server subdirectory

    Is it possible to define a sorry service with a specific url without service type redirect ? I want to specify the url location of the sorry service page. Thanks