PDF Vision .Net - component to convert images to PDF
version 1.2 (May 5th, 2008)
JPG to PDF, JPEG to PDF, TIF to PDF, TIFF to PDF, PNG to PDF, GIF to PDF, ICO to PDF, WMF to PDF, JPE to PDF, JFIF to PDF, BMP to PDF, EMF to PDF
  HelpContent | About PDF Vision .Net| Methods and properties | Samples of using in C#, VB.Net, ASP.Net| License | Pricing | Support and Contanst

Pdf Vision .Net - methods and properties description

The component can convert image files(strings) into Pdf files.
This scheme shows all methods and properties of DLL, but you can use not all of members, because all of them is already set by default to make conversion more precision.

Methods:
 ConvertFile()
 ConvertFolder()
 ConvertPackFiles()
 ConvertByte()

 
Properties:

PageStyle parameters:
 PageSize
 PageOrientation
 PageMarginLeft
 PageMarginRight
 PageMarginTop
 PageMarginBottom

TextStyle parameters:

 Pageheader
 Pagefooter

 FontFace
 FontSize
 FontColor
 TextAlignment

 



 

ImageStyle parameters:

 Height
 Width
 Across

   
   
   
   
int ConvertFile(string inputFileImage, string outputFilePdf) - converts image files into PDF files

return values:
0 - converting OK
1 - can't open RTF file 2 - can't create PDF file
3 - not enough memory (error converting)
Example: //create object
SautinSoft.PdfVision i = new SautinSoft.PdfVision();
//convert file i.ConvertConvertFile("d:\\1.rtf","d:\\1.pdf");
string ConvertFolder(string directoryImageFiles, string outpurFilePdf) - this method takes path to RTF file and returns PDF string.

Example: 
//create object
SautinSoft.PdfVision i = new SautinSoft.PdfVision();
if (p!=null)
{
//set converter options (not required)

i.TextStyle.Pageheader = "Header";
i.TextStyle.FontColor.SetRGB(255,0,255);
i.PageStyle.PageSize.A3();
i.PageStyle.PageOrientation.Landscape();
i.ImageStyle.WidthInch(3);
i.ImageStyle.Height = 200;
//convert file
i.ConvertFolder("d:\\","d:\\1.pdf"); }
string ConvertByte(byte[] bImage, string outputFile) - this method converts array bytes Image into PDF file

int ConvertPackFiles(string[] imageFiles, string outpurFilePdf) - this method takes name image files in array string and path to output PDF file.You may adjust the component and output PDF file will look as you wish.

PageStyle.PageSize - select page size

Possible values: A3, A4, A5, A6, B5, B5Jis, B5Iso, Folio, Statement, Letter, Legal, Executive, Oficio2, Auto
Default value: Auto, as size of image

Example: i.PageStyle.PageSize.Legal();
or
i.PageStyle.PageSize.Widthmm(240.5);
i.PageStyle.PageSize.HeightInch(14.0);


PageStyle.PageOrientation - select page orientation: Portrait or Landscape

Possible values: Portrait, Landscape.
Default value: Portrait

Example: i.PageStyle.PageOrientation.Landscape();

PageStyle.pageMarginLeft, pageMarginRight, pageMarginTop, pageMarginBottom - set page margins

Possible values: any value in inches or mm
Default values: 0

Example:
i.PageStyle.PageMarginLeft.Inch(1.5);
i.PageStyle.PageMarginRigth.mm(20);

 

TextStyle.Pageheader, Pagefooter - header and footer page. If pageheader(pagefooter) is setted, then size of PageStyle.MarginTop (PageStyle.MarginBottom) will be increased.

Possible values: any value in string
Default values: ""

Example:
i.TextStyle.Pageheader = "Page Header";

TextStyle.FontFace - Font face for rendering pageheader and pagefooter

Possible values: TimesNewRoman, Helvetica, Courier and others.
Default value: Helvetica

Example: i.TextStyle.FontFace.HelveticaBoldOblique();

TextStyle.FontSize - default font size

Possible values: Any size
Default value: 14

Example: i.TextStyle.FontSize = 10;

TextStyle.FontColor - keep font color as in HTML

Possible values: Any size, 0 - Auto
Default value: gray or RGB(100,100,100);

Example: i.TextStyle.FontColor.SetRGB(255,0,255);
TextStyle.TextAlignment - default page alignment

Possible values:
Left, Center, Rigth.
Default value:
Center

Example: i.TextStyle.TextAligment.Left();

ImageStyle.Across - ability to place images by horizontal

Possible values: true of false
Default values: true;

Example:

i.ImageStyle.Height = 100;
i.ImageStyle.Width = 100;
i.PageStyle.PageSize.A4(); // !!! require set width page !!!
i.ImageStyle.Across = true;
or

i.ImageStyle.Height = 100;
i.ImageStyle.Width = 100;
i.PageStyle.PageSize.A4(); // !!! require set width page !!!
i.ImageStyle.Across = false;

note: if i.PageStyle.PageSize.Auto() then image places one by one page and i.ImageStyle.Across is unnecessary

ImageStyle.Width ImageStyle.Height - specify image width and height

Possible values: any value in inches or mm
Default values: 0;

Example:
i.ImageStyle.WidthInch(3);
i.ImageStyle.Height = 200;