Table of Contents

Class PdfTools

Namespace
Root.ReportNet.Pdf.Tools
Assembly
ReportNet.dll

Provides methods for working with PDF files.

public static class PdfTools
Inheritance
PdfTools
Inherited Members

Methods

GetMM(double)

Converts a value from points to millimeters.

public static double GetMM(double valueInPoints)

Parameters

valueInPoints double

The value in points to convert.

Returns

double

The converted value in millimeters.

Examples

Convert a value from points to millimeters.

RepLineMM line = new(pen, PdfTools.GetMM(350), 100);

GetMM(double?)

Converts a nullable value from points to millimeters.

public static double? GetMM(double? valueInPoints)

Parameters

valueInPoints double?

The nullable value in points to convert.

Returns

double?

The converted nullable value in millimeters.

Examples

Convert a nullable value from points to millimeters.

public class ExampleReport : HeaderFooterReport {
  public ExampleReport(double? width) {
    ImageData image = new ImageJpegData("Example.jpg");
    Logo = new UserPlaceableImageMM(image, ContentWidthMM, AlignHor.Right, -15, AlignVert.Top, PdfTools.GetMM(width));
  }

GetPoints(double)

Converts a value from millimeters to points.

public static double GetPoints(double valueInMM)

Parameters

valueInMM double

The value in millimeters to convert.

Returns

double

The converted value in points.

Examples

Convert a value from millimeters to points.

RepLine line = new(pen, PdfTools.GetPoints(200), 100);

GetPoints(double?)

Converts a nullable value from millimeters to points.

public static double? GetPoints(double? valueInMM)

Parameters

valueInMM double?

The nullable value in millimeters to convert.

Returns

double?

The converted nullable value in points.

Examples

Convert a nullable value from millimeters to points.

public class ExampleReport : HeaderFooterReport {
  public ExampleReport(double? widthMM) {
    ImageData image = new ImageJpegData("Example.jpg");
    Logo = new UserPlaceableImage(image, ContentWidth, AlignHor.Right, -50, AlignVert.Top, PdfTools.GetPoints(widthMM));
  }