Using VDF in a web service
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 http://old.vdraw.com/images/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 the WebApplicationCreateDrawing as 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 the WebApplicationSendPDFEmail as 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 : http://old.vdraw.com/Export6/60000414-How_can_insert_a_drawing_as_block_that_was_stored_in_a_database_with_ToStream_method_.htm if you want to use drawings that can be stored/retrieved to/in a database.