Description
Assembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
CopyC#
CopyVB.NET
This parameter squeezes or extends size of images in both direction proportionally.
Namespace:
DuoDimensionAssembly: pdfduo-net (in pdfduo-net.dll)
Version: 2.4.0.0 (2.4)
Syntax
| C# | Visual Basic |
public float ImageScale { get; set; }
Public Property ImageScale As Single
Remarks
If the value less then 1 the image become narrow. The value greater then 1 extdands the image.
Examples
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); }
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
ImageInfo Class
DuoDimension Namespace