C# 2019 Windows Forms Developer Getting Started
|
C# 2019 Windows Forms Developer Getting Started |
1. Assuming that you have already run the ASP.NET PDF Processing SDK Component installation program and started visual studio 2019, the next step is create a new project, select Windows Forms App (.NET Framework). Click OK.
2. Enter your Project name and location, Click Create button.
3. In Solution Explorer, selected References, right click the mouse, select Add Reference... , select Browse, select PDFProcessingWrapper.dll from
C:\Program Files (x86)\ASP.NET PDF Processing SDK Component\bin folder, then click OK.
4. select Select Form1.cs, press F7, add the following import statements to the top of the page.
using PDFProcessingWrapper;
4. Add the following code in Form load event, make sure you have temp folder that include test1.pdf and test2.pdf.
private void Form1_Load(object sender, EventArgs e)
{
PDFProcessing obj = new PDFProcessing();
bool bResult = obj.Merge("c:\\temp\\test1.pdf", "c:\\temp\\test2.pdf", "c:\\temp\\output.pdf");
if (bResult)
MessageBox.Show("Merge Completed");
else
MessageBox.Show("Merge Failed");
}
5. Press F5 run the project, it will output output.pdf in c:\temp folder