some I'm back with a very perplexing problem. I have written some classes using WatiN and the Interop libraries in .NET in order to open a separate Excel application, read a few URLs from some of the cells, and then use this list to have my IE browser navigate to these relevant websites and then capture screen shots. However, after opening an Excel application using the Microsoft.Office.Interop.Excel library APIs, my IE instance that was previously instantiated no longer will navigate to web pages or take focus on the screen in order to properly capture the full web pages. It is still working however because it will capture really short but wide blank white images. Has anyone else encountered similar problems with WatiN and other applications being run at the same time?
While this may not be the answer for your question, there is one suggestion that I have. Have you considered reading Excel file without opening an instance of Excel using the Interop API?
Related
I have an existing, and very complex, library that generates a System.Drawing.Printing.PrintDocument() that is used to send print jobs directly to a printer.
I now need to take this existing library and generate PDF documents for a web application.
I tried looking into 3rd party libraries such as ABCpdf, Spire.PDF, PDFSharp, etc, and none of them seem to be able to take a PrintDocument as input. At least none of their documentation indicated they could.
There are a couple of other questions here regarding this, but none of them point to an actual solution or library that works.
Installing a print driver such as Bullzip doesn't seem to be an option either as I need to return the rendered PDF through the web application.
What options are there for taking a PrintDocument(), rendering it as a PDF, and then serving it through a web application?
I'm trying to make my program have the ability to display a Microsoft Word file on a form but not having any luck in doing so. I want to be able to open the file and display it on the form as a Read-Only. So basically just display it's contents. Various users on the web have recommended displaying files in the WebBrowser control (under toolbox). I have tried this but failed to get it working. My end goal is to be able to annotate on top of the web browser (or something of similar manner) and subsequently save the annotations along with the opened file.
I'm not that experienced in the C# language too so any help on how to achieve my problem would be greatly appreciated.
You need a DOCX viewer control. My company recently gave away our multi-format WinForms viewer control as a free product - XtremeDocumentStudio .NET Free. It can display DOCX and is available on NuGet. It does not require a Web Browser control for embedding an online viewer or Word software installed locally.
http://www.nuget.org/packages/XtremeDocumentStudio.NETFree/
There are some good links that might help you.
First, you will find a closely related or similar question here
And in that conversation someone posted the following link which is about how to build a user control for displaying Word documents in a webbrowser control.
I also found another article here about how to integrate Excel in a Windows Form application using WebBrowser. But Excel is used as an example and you may be able to adapt it to Word.
Hello I want to create an application which will make things easier for me.
I always need to convert a bunch of power point documents to one note, but the process takes a few minutes for each. The process goes as follows:
1.)I have to open the powerpoint and then print>Print to Onenote.
2.)Then once Onenote opens I have to, file>save as>Page> Onenote 2007 Section.
I want create an application that will allow me to be able to browse for a PowerPoint file and then have all the slides from the PowerPoint file to be converted into a one note page and then saved in One note 2007 format.
I have experience programming using C#.
Thank you!
One simple thing you can try is to use SendKeys.
If that is not good enough, you can do the full Office interop story.
I am working on a Silverlight web application that creates PDF documents. We want our clients to print these PDF documents but we do not want them to see it or save it locally.
Is there a way to send PDF data directly to client's printer without opening it in client's browser?
Please advice.
No -- Silverlight 3 does not support printing natively.
You can usually get some things done in the browser using Javascript, but that won't let you directly send a PDF the way you're discribing.
It's possible to write a seperate app that lives on the client machine and then integrate with that... For an internal line-of-business app that could be a good solution, but the obvious drawback is that you're stepping outside of Silverlight's multi-platform bubble.
Here's an article that might be worth looking at: http://jonas.follesoe.no/PrintingInSilverlight2UsingCSSAndASPNETAJAX4.aspx (the comments are also interesting, and some of them talk about working with PDFs)
Update: Silverlight 4 now supports this.
No. Silverlight does not have access to any printer resources directly, only via javascript print functions.
With C#, how can I print a PDF document (without any dialog boxes in the background) to an indicated printer?
I have used the following PDF library in the past to perform batch printing of PDF documents from a C# Windows Service.
http://www.quickpdflibrary.com/
It's a pretty decent library and if I remember correctly it only took a few lines of code to print the document. It worked very well and saved me a consider amount of time.
Also, the recommended link that discusses using DDE to launch a desktop application on a server to perform the printing is a bad idea. Adobe Reader probably doesn't support this and since it is a desktop application running in a windowless session you may run into problems with message boxes and dialog boxes. That solution just doesn't scale in my humble opinion.
here we go
Disclaimer: I work for Atalasoft
If you don't want to depend on Acrobat being on the server, you need to rasterize the PDF pages yourself and send them to the printer using the normal .NET printing API. We have a product that can rasterize PDF that uses the Foxit engine underneath. It deploys as a normal .NET assembly and doesn't require any other software to be installed.