1.
Place the files "PdfVision.dll" into your bin directory.
2. In Visual Studio manually add a reference to the file PdfVision.dll
via "Add reference" for the current project.

using System;
using System.IO;
namespace ExamplePdfVision
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
static void Main(string[] args)
{
/*/
* This is a code sample of using the PDF Vision .Net
* If you need more information about PDF Vision .Net email us at:
* pdfvision[at]sautinsoft.com or support[at]sautinsoft.com
/*/
//create object of the PDF Vision .Net
SautinSoft.PdfVision objV = new SautinSoft.PdfVision();
byte[] pdf = objV.ConvertByteToFile(bImage);
//objV.Serial = "XXXXXXXXXXXXXXX";
//specify converting options
//objV.PageStyle.PageSize.Letter();
//objV.PageStyle.PageMarginLeft.Inch(1);
//objV.ImageStyle.Height = 150;
//objV.ImageStyle.Width = 150;
//convert image to PDF file file
objV.ConvertFile("..\\..\\Page2.jpg","..\\..\\1.pdf");
System.Diagnostics.Process.Start("..\\..\\1.pdf");
//convert array of images into PDF file
string[] arStr = new string[3];
arStr[0] = "..\\..\\Page1.jpg";
arStr[1] = "..\\..\\Page3.gif";
arStr[2] = "..\\..\\Page2.jpg";
objV.ConvertPackFiles(arStr,"..\\..\\2.pdf");
System.Diagnostics.Process.Start("..\\..\\2.pdf");
//convert HTML file to PDF file
objV.ConvertHtmlToPdf(@"d:\Test.htm", @"d:\Test.pdf");
}
}
}
|