ProcessFormSubmission form submitted as pdf issue

Hi
I have a scenario where, the form must be submitted as PDF content_type, i.e while designing the form, I am setting the submit form as "PDF" format. I have written a J2EE application that receives the submitted form.  Here is what, I am doing.
Document formData =
new Document(request.getInputStream()); 
formData.copyToFile(
new File("C:/home1/eformwas/InputFile.pdf"));
I ensured that the submitted content from the web browser is a pdf file by opening the InputFile.pdf in the acrobat reader and I verified that the form is siubmitted with the data that I have posted.
Next step, I wanted to process this form, and extract out some of the data elements in it. Hence I did the following
RenderOptionsSpec processFormSubmissionOptionsSpec =
new RenderOptionsSpec();
processFormSubmissionOptionsSpec.setXMLData(
true);processFormSubmissionOptionsSpec.setPDF2XDP(
true);processFormSubmissionOptionsSpec.setExportDataFormat(
"XMLData");
formsResultObject = formsServicesClientObject.processFormSubmission(formData ,"HTTP_REFERER=referrer&HTTP_CONNECTION=keep-alive& CONTENT_TYPE=application/pdf&CONTENT_TYPE=application/vnd.adobe.xdp+xml&CONTENT_TYPE=text/ xml",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)",  
processFormSubmissionOptionsSpec);
When I execute the above code, I get the following error at processFormSubmission method,
Caused by: com.adobe.livecycle.formsservice.exception.FormServerException: Parse error on document: DataSets error: Parse error on document: FSRequest error:  Content is not allowed in prolog.
Any idea, of what is causing this issue. Can I process a form that is submitted as "pdf" content type.? I guess, I can.
As a cross check, I created the whole scenario by creating a process in the LC process modeller and used the processFormSubmission task of the Forms Service and I was successful in processing the form. Not sure, am I missing to set something in RenderOptionSpec or is this a bug in LC SDK ?
LiveCycle error log, also reports the error when invoked through LC SDK API
[1/26/10 11:13:36:627 EST] 0000008a FormServerExc E com.adobe.livecycle.formsservice.logging.FormsLogger logMessage ALC-FRM-001-016: Parse error on document: DataSets error: Parse error on document: FSRequest error: Content is not allowed in prolog.
However, everything works like a charm if processFormSubmission invoked as part of LC process model. I even downloaded the data part as getOutputXML task in the process model and it looks well formed.
Will greatly appreciate your response.
Many Thanks
Gopala...

Hi,
The issue got resolved. Just posting the solution to benefit other folks who can potentially face the same issue.
It worked by setting the content_type="application/pdf" only in environment buffer parameter of formSubmission when the submitted content is of type pdf.
Actually, I referred to the livedocs adobe article @ http://livedocs.adobe.com/LiveCycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/js/html/w whelp.htm?&accessible=true
which specifies the following, which is contradictory to the solution.
"You can also specify multiple content type values such as:
CONTENT_TYPE=application/pdf&CONTENT_TYPE=application/vnd.adobe.xdp+xml
to ensure various form submissions can be used"
Regards
Gopala...

Similar Messages

  • Please help with submitting a pdf form

    I've spend the last few days (literally) searching and searching - in this forum and across the web - for a SIMPLE solution to this problem and found nothing. Actually, I have found a few posts apparently trying to do the same thing I am, but with never a solution beyond "hire a programmer." Maybe  I'm missing something obvious out there, and if so please feel free to  throw tomatoes at me (along with a link I can get what I need - lol)
    At this point I'm completely stumped - furthermore, I'm not a code guru in the slightest. In my research, I did find and buy a script that was supposed to do what I needed - but it doesn't so I'm still stuck and $50 in the hole.
    Moving on, I realize this may be a rather low-tech request given the power of Adobe forms, but I have a client who wants it this way so that's the way it has to be. So, here we go...
    My client wants his website viewers to complete an employment application pdf form and click <submit>
    I have the form completely finished and ready to go
    He then wants to receive that same completed form as a PDF document as an email attachment
    He cares nothing about processing the form DATA (fields) becuase he simply wants to print the form and save it to his computer for future reference
    However...
    Most of the people viewing and completing this app are NOT computer savvy
    In fact, many viewers use public computers (such as at a library) and have no email capabilities or the ability to save the form
    So I cannot use the basic submit-by-email function (that requires a desktop email client)
    So far what I've been trying to do (with the purchased script referred to above) is direct my <submit> button to the url of the php script on the client's server. If I select "html" in the (pdf) submit dialogue box, I do in fact get the DATA from the form in an email. But that's not what I need. If I select "entire pdf document" in the submit dialogue box, I get an error w/ the script.
    In my research I've read that the form DATA can be sent to the server, then parsed back into a PDF form. This seems logical but unnecessary. Also this is an 8 page form with LOTS of data fields, some are required others are optional.
    Is there ANY WAY to have the same form a viewer is filling out and submitting simply sent as an email attachment from the server the form is hosted on???

    Yes, that's possible, and I have just the script...
    Sorry, I couldn't resist.
    I would suggest that the best approach is to set up the form to submit just the form data as an FDF file. This avoids the limitations associated with Reader-enabling the form, which is necessary for the entire filled-in form to be submitted. You mentioned that just sending the form data is logical but unnecesary, but this will be by far the most reliable method.
    Now, you just need a server-side program (script) that processes the form submission. Here's what the script would do:
    1. Accept the incoming data and check that it is a valid FDF.
    2. Attach the FDF to an email message that gets sent to your client
    The recipient of the email can launch the FDF attachment and the corresponding PDF will load and get populated with the data in the FDF. The filled-in PDF can then be viewed/printed/saved.

  • Submitting a PDF form and Error Message

    One of my users received the following error message when submitting a PDF form: "An error occurred during the submit process. The server has an invalid SSL certificate." Can anyone tell me what this error is and how do I prevent it?

    I have had the same error - we are behind a webfilter which is very tight
    can you please advise the domains i need to whitelist?
    many thanks
    Bruce

  • The form submits twice !

    Hi,
    I'm getting an issue while submitting a pdf form to a php script.
    the javascript code is:
    this.submitForm({cURL: "http://www.mysite.fr/myscript.php#FDF",cSubmitAs: "XFDF"});
    when the code is executed, myscript.php  is called 2 times !!
    I can deal with that but i have to Code spécific actions (php side) to avoid twice Inseert, Update and so on...
    It seems to be a BUG of the submitForm function ? do you know how to get rid of it ?
    Thanks.

    I have the smae issue!!

  • How to submit a form as a PDF

    I have created a form using Live Cycle Designer 8 from an existing Word document. I have added a "Submit by Email" button. Unfortunately, the button only submits the data in XML format. I would like submit the entire form as a PDF that can be read in Acrobat Reader.

    You can go edit the XML Source and replace the <br /><submit format="xml" ... with <submit format="pdf"<br /><br />OR (thank you to OP for following)<br /><br />Open as a Livecycle form <br />Drag a button from the pallet onto your form <br />Change the control type to submit <br />On the submit tab [Submit to URL:] enter "mailto:[email protected]" <br />Change the submit as filed to PDF <br />Save <br /><br />BUT when user will be working with the Acrobat free reader, it won't work... you will have to do:<br /><br />Open the form in Acrobat Pro <br />Select advanced menu <br />Click enable usage right in Adobe Reader <br />Save <br /><br />I'm search the forum to find the fix to that, whitout having to extended the user's right....

  • Unable to download form as a pdf file?

    I have tried numerous times to download a completed form as a PDF file and keep encountering an error message within Adobe.  Why is this happening and what can I do to resolve this issue?

    I have tried numerous times to download a completed form as a PDF file and keep encountering an error message within Adobe.  Why is this happening and what can I do to resolve this issue?

  • Submitting a PDF with HTTP Post

    I am new to servlet programming.
    However, I have managed to create a servlet to handle PDF submissions from an HTML form. The parameters used are
    <input type="file" name="datafile" size="40">
    <input type="submit" value="Send">
    I am using the datafile as the parameter in the servlet for the PDF. I would like to create the same functionality where I can submit the entire PDF form the PDF.
    What is the format to submit the file type parameter with datafile as the name ?
    Aditya

    Hi,
    As I know you can determine this parameter in PDF form? you can only submit whole PDF file to some link. This means you have o write one more servlet to handle submitting from pdf form.
    Check this http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/wwhelp/wwhimpl/common/ht ml/wwhelp.htm?context=sdkHelp&file=000309.html
    http://forums.adobe.com/message/1354202
    BR

  • Why won't adobe download my form as a pdf?

    When I try and download my form as a PDF adobe seems to build it and then asks where I want to save it. When i try and save I get an error message.
    'Acrobat.com could not save this PDF file. The file might be open in another application and cannot be overwritten.'
    I dont have it open in another application so am not sure what the problem is. Help please!

    Hi,
    Please refer to the following FAQ: http://forums.adobe.com/docs/DOC-4141
    Post back to this thread if you are unable to resolve the issue.
    Regards,
    Brian

  • Render Form Guide from PDF

    I'm trying to render a form guide from a pdf, using the RenderFormGuide service, but I get the following error:
    Failed to load TemplateStream for FormQuery= from location URI =repository://.
    Does this mean that the only way to render a Form Guide is to pass the path to an xdp and not a document containing a pdf?

    Ok - thanks for the quick reply.
    The reason I'm trying to render a Form Guide from a PDF is that once the user submits the Form Guide a PDF is rendered, but this PDF isn't Reader Enabled. So my thought was that if I used a Reader Enabled PDF to render the Form Guide I would end up with a Reader Enabled pdf once the Form Guide was submitted. I've set the 'Submit from' propety in the 'Guide Properties' to PDF.
    Seen as this isn't possible, is there a way to Reader Enable the PDF the Form Guide submits to?

  • Submit button to return a completed form as a pdf attachment

    Win XP SP3
    LiveCycle ES 8.2
    I’ve created a submit button to return a completed form as a pdf attachment (see http://cookbooks.adobe.com/post_How_do_I_change_the__Email_Submit__button_so_it_wi-16533.h tml “Use a regular form button”) but the fields in the filled & submitted form that arrives in me inbox are editable e.g. I can alter or delete what’s been entered.
    This form will be accessed through a link on the organisation’s website & will open in a browser, rather than in reader itself.
    How can I set the form so that once it’s been submitted the fields become uneditable? This needs to be something that I do to the form before it’s uploaded to the site so as to make it as simple as possible for the people filling it in.
    TIA

    You can put a Signature Field on the Form and set the Property to lock the form Fields after signing.
    So once the form is signed and submitted it cannot be edited.
    ~Pranav

  • Xfaform/pdf issue

    Hi,
    We have a workflow where a user fills a form (.xdp ) and submits it from the workspace.
    In Livecycle  7, we have used the user action where the input form was mapped to a xdp variable  and when the user submits it , the form is configured to be submitted as a pdf  and the submitted pdf is stored in a document variable. This is done so that the attachments and digital signatures get propagated to the next stage and  also so that the form data is written to a mssql server database using  javascript in the form.
    We are trying to recreate this workflow in  Livecycle ES2. However, this approach does not seem to work.  The input form is  assigned to a xfaform variable (since  there is no option in ES2 to assign it to xdp variable)  and when user submits it , the form is configured to be submitted as a pdf and is stored in a  document variable. 
    With this settings, when the user submits the form, the workflow stalls with the following error:
    2010-05-10 07:06:02,175  ERROR [org.jboss.ejb.plugins.LogInterceptor]  TransactionRolledbackLocalException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doSupports(c om.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.Transacti onCallback) throws  com.adobe.idp.dsc.DSCException, causedBy:
    com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce  object: com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance@1cdddcf of type: com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance  to type: com.adobe.idp.Document                     
    Since, the workflow errors out when trying to  convert to the document datatype , we have also tried the following alternatives:
    ·         Input form mapped to a document variable and submitted as pdf when user submits it. This does not give any error but the javascript (triggered when the user submits the  form) which writes to a mssql server database using xpath expressions does not work.
    ·         Input form mapped to a xfaform variable and  submitted as xdp when user submits  it. This also does not give any error but the attachments which the originator adds  to the form are not visible at the next stage (at the next user assign task) .  The “show attachments and  notes” property checkbox in user assign task is also checked.
    Can you please help us achieving the below  requirement in Livecycle ES2 which we were able to implement in Livecycle 7:
    ·         When the user fills and submits the form, a javascript in the form writes the form data to the mssql server database
    ·         The attachments and the signatures added to the form propagates to the next user tasks
    Thanks,
    Nishaz

    The input form is  assigned to a xfaform variable (since  there is no option in ES2 to assign it to xdp variable):
    Can you try to make you input form variable type as XML? I hope its better to save your form data in XML instead of XFA Instance.
    But I am not not sure about carry forwarding the signatures to next stage.
    Nith

  • To convert Smart Form output to PDF format and send it via email.

    Hi Friends,
    Could any one please tell me, how to convert the Smart Forms output to PDF format and send it via email to customer. If any one have the code, kindly mail me to [email protected]
    Thanks & Regards,
    John

    Refer the links -
    how to convert smartform into pdf and send through mail
    Smartform as PDF attachment to a mail.
    smartform pdf and mail
    smartform to pdf to mail
    Regrads,
    Amit
    Reward all helpful replies.

  • How to increase count in a text increases on each new form submitted?

    Hi All,
    I have a field in infopath form as 'RefNo', whenever new form submitted, it count should increase. How to achieve this scenario?
    Thanks in advance!

    I'm not sure if you can do this to display on form load, but you could do this on submit and edit form. 
    Refer to the following posts,
    http://sharepointryan.com/2011/05/25/add-an-auto-numbering-field-to-an-infopath-form/
    http://sharepointfromthetop.wordpress.com/2011/08/31/auto-numbering-infopath-forms/
    --Cheers

  • Created a Form in Adobe Acrobat XI and save that form as "Standard" PDF

    I created a Form with Adobe Acrobat XI and now I want to add a button for save that form as "Standard" PDF with Java Script or other suitable way. Please help me.
    Thank You.

    Forms are entirely standard. What do you mean by "standard" in this case. Do you mean "not a form, so that the bits filled in are just permanent parts of the PDF like the other stuff"?

  • How to put more than 1200 characters in a text form within a pdf created in Adobe Acrobat

    I need to know how to put more than 1200 characters in a text form within a pdf created in Adobe Acrobat. I have a request from a customer to do so and after googling I have came up with nothing. Also the customer would like it if they could convert said pdf form to a microsoft word document with the text form.

    There's no limit on the number of characters you can enter into a text
    field, unless you set it as such.

Maybe you are looking for

  • Msiexec /qn fails when its not run using the built-in local administrator account

    Hello all, I am working on a project where I am trying to automate the deployment of VMs through a self-service portal. Among other tasks such as clone VM, sysprep it, assign an IP, create AD computer object, join VM to domain and so on..., i need to

  • Loose data

    Hello, I acquire data from 2 device 6025E by sharing the scan clock. But I have some problem to save data on DIADEM. I loose datas. For example, with a test during 2mn30, I have only a duration of 2mn15 on DIADEM. Moreover, I loose data during all th

  • Fix text scaling on Youtube?

    Hi Firefox Support! I have a 3k monitor on my Laptop and Youtube has really small text on its UI. This doesn't happen to me on any other browsers like Chrome and IE. Is there a way to fix it or do I wait for an update? Thanks! I have a sample photo b

  • Issues in Executing Database Trigger

    Dear All, I wrote two triggers and the second trigger is dependent on the first trigger but the first trigger is not fired and if i inserted the record in the table omni_reportingdatastatus manually then the second trigger gets fired. 1) trigger CREA

  • Accidentally deleted Quicktime and it wont install again

    Hi, I accidentally deleted Quicktime X from my computer and emptied the trash. When I went to install Quicktime again from Apple, it says it wont let me. In the Install window is says, "Quicktime cant be installed on this disk. This version Quicktime