Currently i have this method that draws a rectangle on the top left corner of the page. I wanted to create another method that will search for a rectangle drawing in any of the four corners of my scanned document. How can i go about writing a method that will check each corner for a rectangle drawing based what i created for drawing the rectangle.
static void AddQRTag(PdfSharp.Drawing.XGraphics gfx, int xPosition, int yPosition, string QRdata, string HRdata)
{
gfx.DrawRectangle(XBrushes.White, xPosition, yPosition, xPosition + 55, yPosition + 85);
PdfSharp.Drawing.XImage xImage =
PdfSharp.Drawing.XImage.FromGdiPlusImage(BuildQR(QRdata.ToUpper(), 3,
QRCodeEncoder.ENCODE_MODE.ALPHA_NUMERIC, 2, QRCodeEncoder.ERROR_CORRECTION.M));
gfx.DrawImage(xImage, xPosition + 5, yPosition + 5, xImage.PixelWidth * .8, xImage.PixelWidth * .8);
//XFont font = new XFont("OCR B", 10, XFontStyle.Bold);
XFont font = new XFont("OCR B", 6);
XTextFormatter tf = new XTextFormatter(gfx);
tf.Alignment = XParagraphAlignment.Left;
//XStringFormat format = new XStringFormat();
//format.Alignment = XStringAlignment.Near;
XRect layout = new XRect(xPosition + 5, yPosition + 55, 55, 30);
tf.DrawString(HRdata.ToUpper(), font, XBrushes.Black, layout, XStringFormats.TopLeft);
//gfx.DrawString(HRdata, font, XBrushes.Black,layout,format);
}