Thomas,
I looked into the tiff conversion, and even though I found some code that I was able to get to work for me, it simply isn't an option in terms of workflow. It would make a currently simple (albeit slightly flawed) process extremely convoluted.
So I looked some more into trying to draw a simple box onto the PDF but don't think I've made much headway.
I put in a delegate for a mouse event like this:
Code:
//mouseevent
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.acroviewer_MouseDown);
Then I created the event handler. I just did a simple message box to identify the different mouse events:
Code:
private void acroviewer_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
switch (e.Button)
{
case MouseButtons.Left:
MessageBox.Show(this,"Left Button Click");
break;
case MouseButtons.Right:
MessageBox.Show(this,"Right Button Click" );
break;
case MouseButtons.Middle:
break;
default:
break;
}
}
The events trigger accordingly, but only if I clicked on the frame of my PDF Viewer. Nothing happened when I clicked inside the actual viewing area. I have no idea why that is.
So I tried to come with some code for drawing, but since the mouse event is only working on the frame, I'm not sure if the code would work or not. On top of that I'm not sure how to declare the gfx in my code context:
Code:
bool draw = false;
private void acroviewer_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
draw = true;
XPen pen = new XPen(XColors.Black, Math.PI);
gfx.DrawRectangle(pen, e.X, e.Y, 2, 2);
gfx.DrawRectangle(XBrushes.Black, e.X, e.Y, 2, 2);
gfx.Save();
}
That's where I'm at right now and I surely could use some help!
Thanks,
Chris