ASP.NET 2019 Developer Getting Started
|
ASP.NET 2019 Developer Getting Started |
1. Assuming that you have already run the ASP.NET Image Converter SDK Component installation program and started visual studio 2019, the next step is create a new project, select ASP.NET Web Application(.NET Framework). Click Next.

2. Select Empty - selected Web Forms , click Create button.

3. In Solution Explorer, selected References, right click the mouse, select Add Reference... , select Browse, select ImageConverterWrapper.dll and PDFConverterWrapper.dll, PDFWrapper.dll from
C:\Program Files (x86)\ASP.NET Image Converter SDK Component\bin folder, then click OK.

4. Select WebApplication1 in Solution Explorer, right click the mouse, select Add - New Items... , select Web Form, enter the Default.aspx name.
then click Add.

5. Select WebApplication1 in Solution Explorer, right click the mouse, select Add - New Folder, rename the folder to output and Add - New Folder again.
named uploads.

6. Select output folder, add tif file in uploads folder, named test.tif.

7. Open Default.aspx.cs, add the following import statements to the top of the page.
using System.Web.Services;
using ImageConverterVsWrapper;

8. Add ConvertImage function and Create an instance of ASP.NET Image Converter SDK Component and then convert multi-page TIF to multi-page PDF File.
[WebMethod]
public static string ConvertImage(string strInputFile)
{
string myUniqueFileName = string.Format(@"{0}.pdf", Guid.NewGuid());
ImageConverterVs obj = new ImageConverterVs();
string stroutpath = HttpContext.Current.Server.MapPath("~/output/" + myUniqueFileName);
string strinputpath = HttpContext.Current.Server.MapPath("~/uploads/" + strInputFile);
bool bResult = obj.ConvertToImage(strinputpath, stroutpath);
if (bResult)
return "Convert Image Successful";
else
return "Convert Image Failed";
}

9. add the following code in Page Load event,it will rotate page 1 to 90 degree.
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(ConvertImage("test.tif"));

10. Press F5 run the project, it will convert multi-page tif to multi-page pdf file in output folder.
