Programmatically convert infopath 2010 forms to pdf using Infopath object model - infopath

I have infopath 2010 forms published to sharepoint 2010 forms library. I want to provide an option ( webpart with a button) in the forms library to export the published form to PDF. Is there a way to accomplish this using Infopath 2010 forms servies object model.
Is there any OOTB feature in Infopath Forms Services Object model that will convert forms to PDF

As infopath is offered as one or more COM objects with an extensive API, you may be able to find a way to convert an infopath form to pdf (losing the form input capabilities).
From an MSDN search, I get one fellows answer :"A low tech way to convert an Infopath file to pdf is to copy & paste the form into MS Word, "save as" html then use Adobe Acrobat to convert the new file to a pdf."

check out my codeplex project IP2HTML which allows you to convert the for to HTML (you can convert the HTML to PDF using any 3rd party tool) without installing MS Office.

Related

How to create an editable pdf in asp.net?

here is a different type of requirement in my project regarding pdf.
I want to generate a pdf with few of prefilled values. rest of the fields can be filled by user so Pdf should allow the user to edit the pdf so that he can save it locally on his system.
The pdf may contain checkboxes and textboxes.
I have worked with "itextsharp", "abc pdf" and "Rad Pdf".
For this purpose i can't use "Rad Pdf", due to some limitations by project owner.
Please share your valuable answers to give me a proper way to do this task.
Looking forward for your replies.
You need to use Adobe Professional, you can turn your existing electronic or paper forms into fillable forms with a few clicks.
http://adobe.ly/Ydc7qb
Acrobat Reader XI provides features to save eForms out of the box.
Provided your clients are using this version of Acrobat they will be able to fill in and save standard PDF forms.
The only problem you may have relates to older versions of Acrobat Reader which did not have this feature.
So any eForm produced using ABCpdf or indeed any PDF library should work the way you want provided your clients have a recent version of Acrobat Reader.
ABCpdf includes an example project called 'Annotations' which shows how to create eForms in this way.
My replies may feature concepts based around ABCpdf .NET because it's something I work on. :-)

ASP.NET MVC3 Integration with Microsoft Office (Word)

I have an ASP.NET MVC3 Application, And I have a form where it generates an output form. Currently I generate the output form in an html file, but I want to switch it to generate it as a Microsoft Word Document, or essentially populate a word template. What would be the best way to accomplish this?
There are several components that allow you to generate a word document programmatically. The one I've had the most success with is Syncfusion DocIO It's a paid utility but worth the price if you need to manipulate word documents programmatically. If cost is an issue, there are tutorials on how to build a server-side document generation utility using Open XML

How to mimic an excel spreadsheet on a website in vb.net?

I am building a website to capture data. I have many spreadsheets that are used for data entry or capture. Now I want to mimic these complex spreadsheets on the web forms but I am unsure of the correct control to use.
Data entry must be allowed and live calculations also need to be made similar to formulas on normal excel spreadsheets. Later on the data must be captured into an SQL table.
What would be the best control to use or method to mimic that functionality, albeit that the spreadsheet component is no longer available in visual studio 2010. Is it a data grid?
Thanks
for custom build you can rely on GridView and keep adding on features to it.
however my reccomendation would be to use Devexpress Grid or some other third party controls and build on it. these controls are more feature rich :)
Here is an extension that contains Excel compatible WinForms. Capturing to SQL should be pretty straightforward using the Entity Framework.
http://visualstudiogallery.msdn.microsoft.com/03A0E5A9-4768-461C-9A72-8255A291094C?SRC=Featured
Check to see if the Office Web Components at http://en.wikipedia.org/wiki/Office_Web_Components#Office_Web_Components will meet your needs.

how to automate word document creation in office 2010

The intranet website is supposed to create a word document client-side from templates
server-side and let the client edit it.
The code that worked in office 2007 doesn't work any more and I can't find any way to do it on google.
I used this code lines which was the only code i did find in google and still nothing
dim appWord
set appWord = New Word.Application
can anyone tell me how to create a word app object that works with word 2010.
thx in advance.
Edit: I need the object to be able to takes parts from various word documents and copy paste them into a single document in a certain formation
You can use the open xml sdk to create and edit office documents, see: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124
Although the download page says office 2007, it works for 2010 as well.

asp.net - Generate Powerpoint file on the fly

I have a client of my web based application who heavily uses the data from our system for powerpoint presentations.
We currently allow data to export in more traditional file types...PDF, CSV, HTML, and a few others. Powerpoint doesn't seem to be really automated.
Is there a way, on the ASP.NET server side, to automate the creation and on-demand download of a powerpoint file format for a report from a system?
There's some documentation on MSDN about the OpenXML format that they're using:
Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API (Part 1 of 2)
Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API (Part 2 of 2)
In this article, Steve suggests using Aspose's Slide application.
He also explains step by step on how to generate the PowerPoint file.
Here are some code excerpts (in VB):
Opening an existing PowerPoint file:
Dim fs As System.IO.FileStream = _
New System.IO.FileStream("c:\mypath\myfile.ppt", _
System.IO.FileMode.Open, System.IO.FileAccess.Read)
Dim MyPres As Presentation = New Presentation(fs)
fs.Close()
Looping the slides and outputting their template formats:
Dim slides As Slides = MyPres.Slides
For i As Integer = 0 To slides.Count - 1
Response.Write(MyPres.Slides(i).Layout.ToString + "<br>")
Next
In his article, he describes more in detail on how to do it.
Well you have two ways of really doing this, without third party tools. The first would be with Automation of PowerPoint, but that requires that your server have PowerPoint installed. The second is to utilize the new pptx file file format and generate the powerpoint document using XML.
I have found that the best way to get started on the XML side is to simply create a powerpoint that does what you want, then save it and look at the XML. You can also review the microsoft documentation. Overall working with the XML formats is pretty easy.
Lastly, there might be some third party items out there, but be careful that they don't require COM automation.
In regards to the previous poster, your statement is incorrect.
You really only have one option for server side ASP.NET automation of this process.
Use the open xml links mentioned by Ben in the original answer...
Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API (Part 1 of 2)
Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API (Part 2 of 2)
The reason for this is that server side automation of office is completely unsupported and is bad coding practise, running com automation servers that are designed for interactive usage in a non-interactive environment is a potential recipe for disaster.
so in summary use the open xml api and generate your pptx's.
There are also other third-party options similar to Aspose Slides, such as OfficeWriter's PowerPoint Writer.
I'm not exactly sure how Aspose Slides works, but with PowerPoint Writer you have an existing, formatted PowerPoint presentation with data markers in it, the you process it with PowerPoint Writer to replace the data markers with data. Here are some examples.
there is another method ,convert your power point presentation to images or xps(silver light presentation) and then use some sort of json(jquery) to show and download them.
i implement the images and xps silver light presentation in my web application

Resources