Allows to set values in mm, inches and pixels for the component's properties

Namespace:  SautinSoft
Assembly:  SautinSoft.PdfVision (in SautinSoft.PdfVision.dll) Version: 5.3.6.5

Syntax

      
 C#  Visual Basic 
public class CSizeType
Public Class CSizeType

Members

         
 All Members  Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Auto()()()
Default value
Inch(Single)
Set value in inches
Mm(Single)
Set value in mm
ValuePx
Allows to set/get value in pixels

Remarks



Examples

CopyHow to convert HTML file to JPEG file in C#
using System;
using System.IO;

namespace Sample
{
    class Test
    {

        static void Main(string[] args)
        {
            //Convert multipage TIFF file to PDF file
            SautinSoft.PdfVision v = new SautinSoft.PdfVision();

            //v.Serial = "XXXXXXXXXXXXXXX";

            //specify converting options
            v.PageStyle.PageSize.Auto();

            v.PageStyle.PageMarginLeft.Inch(1);
            //v.ImageStyle.Heightmm(150);
            //v.ImageStyle.WidthInch(10);

            //Specify a path to a TIFF file, e.g. "c:\my Funny Picture.tiff"
            string tiffPath = Path.GetFullPath(@"..\..\pic.tiff");
            string pdfPath = Path.ChangeExtension(tiffPath, ".pdf");

            //Convert image file to pdf
            int ret = v.ConvertImageFileToPDFFile(tiffPath, pdfPath);

            //0 - converting successfully
            //1 - can't open input file, check the input path
            //2 - can't create output file, check the output path
            //3 - converting failed

            if (ret == 0)
            {
                // Openf produced PDF in default PDF Viewer.
                System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(pdfPath) { UseShellExecute = true });
            }
        }
    }
}
CopyHow to convert HTML file to JPEG file in VB.Net
Imports System.IO

Namespace Sample
    Friend Class Test

        Shared Sub Main(ByVal args() As String)

            'Convert multipage TIFF file to PDF file
            Dim v As New SautinSoft.PdfVision()

            'v.Serial = "XXXXXXXXXXXXXXX"


            'specify converting options
            v.PageStyle.PageSize.Auto()

            v.PageStyle.PageMarginLeft.Inch(1)
            'v.ImageStyle.Heightmm(150)
            'v.ImageStyle.WidthInch(10)


            ' Specify a path to a TIFF file, e.g. "c:\my Funny Picture.tiff"
            Dim tiffPath As String = Path.GetFullPath("..\..\pic.tiff")
            Dim pdfPath As String = Path.ChangeExtension(tiffPath, ".pdf")

            'Convert image file to pdf
            Dim ret As Integer = v.ConvertImageFileToPDFFile(tiffPath, pdfPath)

            '0 - converting successfully
            '1 - can't open input file, check the input path
            '2 - can't create output file, check the output path
            '3 - converting failed


            If ret = 0 Then
                ' Openf produced PDF in default PDF Viewer.
                System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(pdfPath) With {.UseShellExecute = True})
            End If
        End Sub
    End Class
End Namespace

Inheritance Hierarchy

System..::.Object
  SautinSoft..::.PdfVision..::.CSizeType

See Also