void drawRectangle(int X, int Y, int Width, int Height, int LineWidth)

Draws a empty rectangle. The first two parameter (X and Y) define the coordinates for the upper left corner of the rectangle. The third and forth parameter (Width and Height) define the dimension of the rectangle. The lines will be drawn with the size defined in the fifth parameter LineWidth. A given value for that parameter will also overwrite the explicit property LineWidth.

Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
// create new PDF_Writer object
PDF_Writer.Writer PDF = new PDF_Writer.Writer();
 
PDF.LineWidth = 4;
 
// draw green filled rectangle
// Position: X=50 Y=150
// Dimension: Width=200 Height=100
// Line-Thickness: 2 (overwrites PDF.LineWidth)
PDF.drawRectangle(50, 150, 200, 100, 2);
 
// save PDF document to file system
PDF.save(@"C:\PDF_Writer\test.pdf");