Many of you ask about using the VDF libraries in a web service. For this you can use the VDF vdDocument component that you can add to a web service and also create an aspx page that calls this service, set the parameters and get the results. Two simple projects are available for download. You can download them from vdrawWeb.zip extract it in a folder on your disk and open the Visual Studio 2005 solution.
You can build and run them local on your machine using the IIS of the VS2005. You can also publish them to your private IIS server (that has .NET 2.0 installed).
Creating a drawing and sending it back as an image
The first project creates a "gear" from user input and sends the results of this drawing as an image. Set theWebApplicationCreateDrawingas the startup project.
It is very simple and the only thing that is required so you can run it in a web server, is publishing (using the VS2005 Publish option).
These are the folders and files on the web server :
Creating a PDF/JPG and send it to an email address
The second project opens a DXF drawing and then creates a PDF/JPG file that is saved in the /bin/ folder and emails this file to the specified email address. Set theWebApplicationSendPDFEmailas the startup project. You need to specify your mail server url (Host Address) the password and the email account (From Email Address) to send this email. Also you need to specify the email address that this email will be delivered (SendTo Email Address).
It is very simple and the only thing that is required so you can run it in a web server, is publishing (using the VS2005 Publish option). After that in the bin directory that it is created you need to manual upload the Engnative.dll file.
In this project there is a public Boolean named cJPG that if is true then a JPG will be create and sent. This value must be used by evaluators because the evaluation version "cannot" save PDF files. Registered customers can set this boolean to false so a PDF files is created and emailed.
You may also need to check this article : How can insert a drawing as block that was stored in a database with ToStream method ? if you want to use drawings that can be stored/retrieved to/in a database.