Pdf Duo .Net component
This parameter squeezes or extends size of images in both direction proportionally.

Namespace: DuoDimension
Assembly: pdfduo-net (in pdfduo-net.dll) Version: 2.4.0.0 (2.4)

Syntax

         
 C#  Visual Basic  Visual C++ 
public float ImageScale { get; set; }
Public Property ImageScale As Single
	Get
	Set
public:
property float ImageScale {
	float get ();
	void set (float value);
}

Remarks

If the value less then 1 the image become narrow. The value greater then 1 extdands the image.

Examples

CopyC#
StringBuilder html_st = new StringBuilder(@"Testing the image Scale: <img src=image.jpg />");
string file_pdf = @"K:\new.pdf";

try
{
    DuoDimension.HtmlToPdf conv = new DuoDimension.HtmlToPdf();
    conv.OpenHTML(html_st);

    // reduce by half
    conv.ImageInfo.ImageScale = 0.5f;    
    conv.SavePDF(file_pdf);
    System.Diagnostics.Process.Start(file_pdf);
}
catch (Exception ex)
{
    MessageBox.Show(ex.Message);
}
CopyVB.NET
Dim html_st As New System.Text.StringBuilder("Testing the image Scale: <img src=image.jpg />")
Dim file_pdf As String = "K:\new.pdf"

Try
    Dim conv As New DuoDimension.HtmlToPdf()
    conv.OpenHTML(html_st)

    ' reduce by half
    conv.ImageInfo.ImageScale = 0.5
    conv.SavePDF(file_pdf)
    System.Diagnostics.Process.Start(file_pdf)
Catch ex As Exception
    MessageBox.Show(ex.Message)
End Try

See Also