PDF Vision .Net -
managed C# component

to convert HTML and any types of Images to PDF, merge and split PDF documents.
version 2.0.1 (June 23th, 2009)

HTML to PDF, JPG to PDF, TIFF to PDF, PNG to PDF, GIF to PDF, ICO to PDF, WMF to PDF, BMP to PDF, EMF to PDF, split and merge PDF files

Content | About PDF Vision .Net| Methods and Properties | Samples of using in C#, VB.Net, ASP.Net| License | Pricing and Order | Support and Contacts
Using PdfVision.dll in VB.Net and C#, ASP.Net
Examples for using DLL in:

C#

VB.Net

ASP.Net

C# sample

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");
   }
   }
}
           

VB.Net sample


Imports System.IO
Module Module1
 Sub Main()
 '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
 Dim objV As New SautinSoft.PdfVision()
 '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
 Dim arStr(2) As String
 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")
 End Sub
 End Module
           

The ASP.Net samples stored inside package pdf_vision_net.zip: "PDF Vision .Net Trial (X.X.X)"->"Net 2.0, 3.0 and 3.5" -> "Code samples" ->"ASP.Net - C# and VB".

Copyright © 2002-2009, SautinSoft™. All rights reserved.