Convert filled out InfoPath form to PDF

Hi all
I have this basic setup:
An InfoPath formular is deployed to Forms Server, and a user fills it out. When the user submits the form, I need to somehow convert the form to PDF and attach it to an email sent to the user.
Now, this should be done in .NET code. I am still not quite sure if I will do it as an event handler on the Forms Server og if I will let the document go through BizTalk and let it to the conversion... but in any case, what I have is an .XML file that is actually the filled out form and I need to convert it to PDF that matches how the form looks like, naturally.
I have seen this thread:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/9f43f377-dfd6-4c6e-a361-315bf30f3c91 about it, and I ahve tried doing what it says. But I can't get it working.
I have installed this one:
http://www.microsoft.com/downloads/details.aspx?familyid=4D951911-3E7E-4AE6-B059-A2E79ED87041&displaylang=en and it seems to work - I can now save as PDF in Word, Excel and so on.
Then I created a Winforms program (it wont always be in a winforms program, but for testing purposes...) and I did this:
1. Add the InfoPath Form control to the toolbox (C:\Program Files\Microsoft Office\Office12\Microsoft.Office.InfoPath.FormControl.dll)
2. Drag the Control which now appears in my tool box to my winform.
Then I added this code to some event of the form:
string file = "";
formControl.Open(file);
formControl.XmlForm.CurrentView.Export(".pdf", Microsoft.Office.InfoPath.ExportFormat.Pdf);
Now, the issue is, that the "Export" method and the "ExportFormat" enum are not recognized and therefore give compile errors.
The only difference between my using statements and the ones in the thread above is that I do not have this one:
using Microsoft.Office.InfoPath.FormControl;
since that name space does not seem to exist - I only have the Microsoft.Office.InfoPath name space. Yes, the Microsoft.Office.InfoPath.FormControl.dll is referenced in my project.
Any thoughts?
My setup:
Visual Studio 2008 with .NET 3.5 SP1
Office 2007, English
Windows XP
Thanks
eliasen, representing himself and not the company he works for.
MVP and three times MCTS in BizTalk.
Blog: http://blog.eliasen.dk

I got your sample project, it compiles without any errors nor warnings.
And then I made some changes to the code so it can actually work:
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InfoPath = Microsoft.Office.InfoPath;
namespace TestInfoPathFormControl
public partial class Form1 : Form
public Form1()
InitializeComponent();
private void Form1_Load(object sender, EventArgs e)
string template = Path.Combine(
Path.GetDirectoryName(Application.ExecutablePath),
"Template1.xsn");
this.formControl1.NewFromFormTemplate(template);
private void button1_Click(object sender, EventArgs e)
this.formControl1.XmlForm.CurrentView.Export(@"D:\test.pdf", Microsoft.Office.InfoPath.ExportFormat.Pdf);
Then I hit F5, the app runs and I can get my test.pdf.
Don't know why it doesn't compile on your side.
I tried on:
Visual Studio 2008 SP1
Office 2007 SP2 (Beta)
Windows 7 Beta
And
Visual Studio 2008 SP1
Office 2007 SP1
Windows Vista SP1
The file version of Microsoft.Office.InfoPath.dll is 12.0.4518.1014, assembly version is 12.0.0.0.
Could you also check that assembly on your side?
Can you see the following memebers from your project's object browser?
They should live in Microsoft.Office.InfoPath.dll.
Regards,
Jie
This posting is provided "AS IS" with no warranties, and confers no rights.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
The CodeFx Project
My Blog (CHS)

Similar Messages

  • Get Summary view of filled out Infopath form

    Hi,
    I have a Infopath form where in it is web browser enabled form having option for users to enter data. They have an option to add multiple rows(items)
    But before submitting, I want to show them the summary of what has been added by them to the form(I need to fetch data if there are multiple rows also)
    Regards, Shreyas R S

    Hi Shreyas,
    Pls check the if it can help you
    http://office.microsoft.com/en-in/infopath-help/design-a-read-only-view-HA010211228.aspx
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • How do I fill out a form already converted from pdf to word

    how do I fill out a form i converted from pdf to a word doc?

    What kind of "form" is it?  A .pdf or .doc file?
    Generally I would save the file somewhere (desktop or document folder).  There is a save button for attachments in mail's header section.  Then open the file with an appropriate app like Adobe Reader for .pdf files or Word or Pages for .doc files.  Fill out the form and save.  Then email the form back as an attachment.

  • Problem filling out a form exported from pdf to docx.

    I "successfully" exported a pdf form to word docx.  The form looks exactly like the original.  However, when I attempt to fill in the blanks (which are large)  the text gets dropped in vertically e.g.  first name la
                                                    st name (on a lower line).  I have no idea what I'm doing wrong.  Filling out this form is urgent, and the only reason I purchased this program.  Any advice will be appreciated.

    Hi Catherine,
    I'd like to assist!
    The file may have converted as an image, possibly due to poor quality.
    Are you able to bring the words together by utilizing your 'back' key?
    Let me know how it goes if you try converting it again.
    Kind regards, Stacy

  • Filling out a form scanned to PDF

    Is this Possible? I would like to be able to fill out this form that I scanned to pdf...while it is still in the computer, then print it out completed so I can mail it off. I just can not seem to figure this out, please help!

    This isn't a question about PDF Specifications; this really seems to
    be about software.
    If you have Acrobat Standard or Acrobat Professional, the answer is
    yes. Please ask in the Acrobat Windows or Acrobat Macintosh forum.
    if you have Adobe Reader only the answer is no.... but you also have
    some software to scan to PDF, so see if that has a forum.
    Aandi Inston

  • Unable to fill out interactive form fields in the pdf form.

    I'm unable to fill out interactive form fields in the pdf tax form in Reader 11.0.06 with purple bar inviting to do so.

    The only Flash Player that is remotely connected to Adobe Reader is the plugin.
    Can you temporarily uninstall the plugin (or both ActiveX and plugin using http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html and see if the problem disappears?
    Reinstall both using these installers http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#mai n-pars_text_4

  • I am new to working with pdf.  I am trying to fill out a form that was attached to a web site.  I have a Macbook Pro.  I am just learning Acrobat.  How do I get the form to accept input?

    I am new to working with pdf.  I am trying to fill out a form that was attached to a website.  I have a Macbook Pro and I am trying to learn Acrobat.  How do I get the form to accept my input?

    If there are Acrobat PDF form fields, not jus a space for a form field, then you will have to add them. It would be better to ask the provider of the form to add the fields. If you cannot add the fields, then you can use the add text feature.
    Have you looked in the "Tools" panel for the "Forms" category?
    Try Acrobat Users Community Tutorials , http://acrobatusers.com/tutorials.
    See Adobe TV - Acrobat, http://tv.adobe.com/channel/how-to/acrobat-xi-tutorials/.

  • How may i fill out a form on a scanned form saved in pdf format?

    how may i fill out a form on a scanned form saved in pdf format?

    With Acrobat you can either add interactive form fields (manually or with the Form Wizard), or you can use the Typewriter tool to add a type of text comment. Exactly how you do either of these depends on which version of Acrobat you're using.
    If you only have Reader, there's nothing you can if the document doesn't have interactive form fields or if it hasn't been Reader-enabled to allow use of the typewriter tool or other commenting.

  • How to convert Infopath forms into pdf or word ?

    I have an urgent requirement. I need to covert approx 50k infopath forms into pdf/word.
    Is there any way to convert it without using a third party software?
    Is this possible via Powershell script ? 

    Not with Microsoft tools. This would be something supplied by a 3rd party, if available at all.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • I am filling out a form that requires me to put a passport photo using Adobe Reader.

    I am filling out a form that requires me to put a passport photo using Adobe Reader.
    However, when I click on the square to insert the photo, a screen pops up telling me to "select a PDF file and import it as an image" and just an "OK" button to press.
    When running the debugger, I get NotAllowedError: Security settings prevent access to this property or method. Field.buttonImportIcon:6:Field Click here to add a photo:Mouse Up. Any way around it? Below is the problem I'm talking about.

    Thanks for your reply.
    I've converted  photos into pdf format and it still won't allow me to insert the photo. I wouldn't know whether it'd be too large or small since I cannot insert it in the first place.
    "Warning: Javascript Windows: Select the PDF file to import this button as an image" is the message that keeps appearing. I can't seem to find anything related to this.

  • Filling out a form in adobe reader

    Im filling out a form in adobe reader for a scholarship. It was going well until I hit a certain section. Instead of typing the words horizontally, it was typing them vertically. Is there any easy way to fix this? I dont want to have to handwrite the entire thing.
    Thanks
    tutorben

    That's an interesting form. It looks like it started out as an XFA form that was created in LiveCycle Designer, and somehow converted to an acroform on a Mac. Whatever the process was resulted in setting the rotation on some of the field to 90 degrees. As Mike said, there's nothing you can do about it with just Reader.
    If you had Acrobat, you could set the proper rotation for the fields. If you really want to do this and don't have Acrobat, you can install the trial version of Acrobat 10. Or you could try contacting the creator of the form and get them to fix it.

  • Filling out a form demo

    What is the best way in Adobe Captivate to demonstrate filling out a form with Narration? I have several pdf forms that are interactive and I want to be able to narrate as I record live action movements. I used the software simulation setting and it ended up looking choppy and confusing. I'm in the process of a trial download of Captivate and I'd like to have this some what figured out before I decide to purchase it. I bought a subscription to Lynda.com to try and understand a little more but it wasn't too much help. Any suggestions are greatly appreciated. Thanks

    Hi there
    Typically those are done by narrating at the same time as you use the software. (I recently created some of these for a different company. A Lynda competitor)
    As you might imagine, it's often like filming a motion picture and you end up with many "takes" to get just the right one.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • What do I need to fill out a form created in JetForm?

    I receive a form that I need to fill out, save and send back.  The problem is the form sent to me is a JetForm.  What software/designer do I need to just fill out these forms?  Are there any free downloads?
    Thank you

    Since Adobe acquired Accelio, formerly JetForms, in April of 2002, I am surprised the form has not been revised using Adobe's LiveCycle Designer.
    If the form has a file type of PDF then form could be filled out and printed by Adobe Reader. If you need to save the form, the author would have had to apply Extended Form Rights with a more current version of Acrobat.

  • How do I fill out a form that was sent to me?

    How do I fill out a form that was sent to me?

    Hi Mary Pyle,
    Please browse this KB Document ( Acrobat Help | Filling in PDF forms ) for a detailed information about filling forms.
    Please reply back if you still have any other query or need any further assistance.
    Regards,
    Rahul Tyagi

  • Everytime I fill out a form when I send it it comes up blank, How do I stop this

    Every time i fill out a form and send it the form is received blank what do i do to stop this from happening ?

    What device, platform, product and version are you using to fill-in the form?
    Macintosh "Preview" corrupts PDFs and does a real job on forms.

Maybe you are looking for

  • BT Infinity Connection Issue/ frequent ping latenc...

    Hi. I'm getting frequent latency over past few month. had Already spoken to agencies about the issue, but no reslovation appeared. So, hopefully, I can get some answer here. Btw, I already tried to switch between channels, reset to factory setting, t

  • ScrollPane not disappearing after dynamic creation

    Gentlefolk; Have a movieclip that that has formatted text. This content is longer than the stage, so I thought of putting it in a scrollpane. Creating a dynamic text box kills the text formatting. The scrollpane has a name "my_SP". If I have this cod

  • Recommended lowest Mac Specifications for 32-Channel Recording.

    I've been looking a lot into using Logic for Multi-Track recording our bands in a Live setting. I mix on a Yamaha M7CL and just purchased two MY16-AT Expansion cards that each give us 16 Channels of Digital Direct Out output, 32 Channels output in to

  • Weblogic 8.1.6 problem.......

    Hi All, i am facing a strange problem, when i start the weblogic server after starting successfully it throws an exception :- <1-Nov-2007 3:10:23 o'clock AM EDT> <Info> <Socket> <BEA-000440> <Native IO Enabled.> <1-Nov-2007 3:10:23 o'clock AM EDT> <N

  • Stuck on restore..

    when i connected my ipod touch [4gen] i noticed a new update. ios 4.3.4. i go ahead and start the update process. next thing i see, itunes is asking me to either choose a new name for my device or restore from backup. i was a little confused at this