Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Helper Routine GetRect¶ Calculates the area of a scaled down page:

static XRect GetRect(int index)
{
  XRect rect = new XRect(0, 0, A4Width / 3 * 0.9, A4Height / 3 * 0.9);
  rect.X = (index % 3) * A4Width / 3 + A4Width * 0.05 / 3;
  rect.Y = (index / 3) * A4Height / 3 + A4Height * 0.05 / 3;
  return rect;
}
static double A4Width = XUnit.FromCentimeter(21).Point;
static double A4Height = XUnit.FromCentimeter(29.7).Point;
Source by www.pdfsharp.net #
 
PREVIOUS NEXT
Tagged: #Helper #Routine #Calculates #area #scaled
ADD COMMENT
Topic
Name
4+6 =