|
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 |
| PDF Vision .Net - methods and properties description
Our component can convert any type of image files (bytes) and HTML to PDF
files (bytes). |
||||||||||||||
|
||||||||||||||
|
Overloaded method. byte [] ConvertByteToFile(byte [] bImage) - converts array of image bytes into PDF bytes. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); int ConvertByteToFile(byte [] bImage, string outputPdfFile) - converts array of image bytes into PDF file. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: 0 - converted successfully 2 - can't create output PDF file 3- converting failed C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); int ConvertFile(string inputImageFile, string outputPdfFile) - converts image file into PDF file. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: 0 - converted successfully 1 - can't open image file 2 - can't create output PDF file 3- converting failed C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); byte [] ConvertFileToByte(string inputImageFile) - converts image file into PDF bytes. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); int ConvertFolder(string inputImagesDirectory, string outputPdfFile) - converts all image files from directory into single PDF file. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Supported extensions: *.jpg, *.bmp, *.gif", *.tiff, *.tif, *.png, *.ico, *.emf, *.exif, *.jpeg, *.jpe, *.jfif, *.wmf, *.photocd, *.flashpix Return values: 0 - converted successfully 1 - can't find direcory 'inputImagesDirectory' or this direcory doesn't contain image files 2 - can't create output PDF file 3- converting failed C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); byte [] ConvertFolderToByte(string inputImagesDirectory) - converts all image files from directory into PDF bytes. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Supported extensions: *.jpg, *.bmp, *.gif", *.tiff, *.tif, *.png, *.ico, *.emf, *.exif, *.jpeg, *.jpe, *.jfif, *.wmf, *.photocd, *.flashpix Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); byte [] ConvertPackBytesToByte(System.Collections.ArrayList inputArrayBytes) - converts all images stored in ArrayList into PDF bytes. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); //put image bytes into ArrayList arImg int ConvertPackFiles(string [] arrayInputImagesFiles, string outputPdfFile) - converts array of image files into single PDF file. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: 0 - converted successfully 1 - can't open image file 2 - can't create output PDF file 3- converting failed C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); byte [] ConvertPackFilesToByte(string [] arrayInputImagesFiles) - converts array of image files into PDF bytes. Supported image types: jpeg, jpg, png, gif, tif, multipage tiff, bmp, ico, wmf, emf Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); Overloaded method. This method is available only for .Net 2.0 or higher. If you need to convert HTML to PDF under .Net 1.1 use the PDF Metamorphosis .Net. byte [] ConvertHtmlToPdf(string inputHtmlFile) - converts HTML file or URL into PDF bytes. Supported HTML documents: any version of HTML or XHTML documents with CSS. Return values: PDF document as byte array - converting successfully. null - converting failed. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); Produced PDF represents collection of image screenshots from HTML document. Therefore the produced PDF file is not editable. To change size of output PDF, specify the property 'ImageStyle.Quality'. The default value is 200, to decrease size of PDF file we recommend to specify 'ImageStyle.Quality' as 100. To increase quality and size of PDF file you may specify it to 400 or higher. If you need to create editable PDF we recommend you to use the PDF Metamorphosis .Net. int ConvertHtmlToPdf(string inputHtmlFile, string outputPdfFile) - converts HTML file or URL into PDF file. Supported HTML documents: any version of HTML or XHTML documents with CSS. Return values: 0 - converted successfully 1 - can't open or ready input HTML file 2 - can't create output PDF file 3- converting failed C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); Produced PDF represents collection of image screenshots from HTML document. Therefore the produced PDF file is not editable. To change size of output PDF, specify the property 'ImageStyle.Quality'. The default value is 200, to decrease size of PDF file we recommend to specify 'ImageStyle.Quality' as 100. To increase quality and size of PDF file you may specify it to 400 or higher. If you need to create editable PDF we recommend you to use the PDF Metamorphosis .Net. PageStyle.pageMarginLeft, pageMarginRight, pageMarginTop, pageMarginBottom - these properties allow to speicy page margins in mm and inches Default values: left - 0 top - 0 right - 0 bottom - 0 To specify value in inches use such construction: PageStyle.PageMarginLeft.Inch(....);
PageStyle.PageMarginLeft.mm(....); C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); PageStyle.PageOrientation - set page orientation: Portrait or Landscape
C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); PageStyle.PageSize - set page size, this property allows to specify page size from list values or specify any width and height in mm/inches. Possible values: A3, A4, A5, A6, B5, B5Jis, B5Iso, Folio, Statement, Letter, Legal, Executive, Oficio2, Auto C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.FontColor - specify font color for text in page header and footer C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.FontFace - specify font face for text in page header and footer Possible values: Helvetica, Courier, Times New Roman, Symbol. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.FontSize - specify font size for text in page header and footer C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.PageHeader - here you may specify text which you want to see in page header
C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.PageFooter - here you may specify text which you want to see in page footer
C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); TextStyle.TextAligment - here you may specify alignment for text in page header and footer C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Height - this property allows to specify the same height in pixels for all images in PDF document Default value: real height of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.HeightInch() - this method allows to specify the same height in inches for all images in PDF document Default value: real height of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Heightmm() - this method allows to specify the same height in mm for all images in PDF document Default value: real height of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.HorizontalOrder - this property allows to specify the order (horizontal or vertical) how images will be placed in PDF document Possible values: false or true Default value: false
When you will specify this value as 'true' images will be stored in PDF as in this picture:
C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.HtmlRepeat - this property is helpful during converting HTML pages to PDF, it allows to specify a height in pixels to repeat data from previous page on current page, like on this picture:
C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.HtmlTimeOut - this property is helpful during converting HTML urls to PDF from Internet, especially for slow Internet connection. It allows to set maximal time of HTML page loading in seconds. If HTML page will be loaded in less time than specified in 'HtmlTimeOut' you don't have to wait end of time. If HTML page will not be loaded in time than specified in 'HtmlTimeOut' you may see non complete HTML inside PDF. Default value: 20 C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.HtmlWidth - this property is helpful during converting HTML pages to PDF, it allows to specify width of browser in pixels. Default value: automatically, if HTML has width less than 900 pixels browser will have width of 900 pixels. If HTML has width more than 900 pixels then browser width will be increased automatically. C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.ImageInterval - this property allows to specify horizontal and vertical space interval between images in pixels for all images in PDF document
Default value: 10 C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Quality - this property allows to set quaility of image(s) and HTML in PDF document Default value: 200 Possible values: 1 ... 10000 This parameter affects to PDF size and converting time, for example during converting the same HTML we have got following results:
Lesser quality gives lesser time and size of PDF C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Scale - this property allows to set scale for all images and HTML in PDF document Default value: 100 Possible values: any postive value C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Width - this property allows to specify the same width in pixels for all images in PDF document Default value: real width of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.WidthInch() - this method allows to specify the same width in inches for all images in PDF document Default value: real width of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); ImageStyle.Widthmm() - this method allows to specify the same width in mm for all images in PDF document Default value: real width of original image C# code sample: SautinSoft.PdfVision objV = new SautinSoft.PdfVision(); int PdfSplit(string SourceFile, string OutputPath) - this method splits file SourceFile to some PDF files into directory OutputPath. The files each have contains one page of Source File. The OutputPath will contain files with number equal to count of pages in the SourceFile. #region split PDF file int PdfMerge(string[] Files, string DestFile) - this method merges all PDF files from Files array to new file DestFile. #region merge PDF files
|
||||||||||||||
| Copyright © 2002-2009, SautinSoft™. All rights reserved. | ||||||||||||||