Пример #1
0
        private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
        {
            PDFLibrary qp = new PDFLibrary();

            qp.UnlockKey(LicenseKey);
            qp.LoadFromFile(OriginalFileName);
            // Calculate co-ordinates, width of PDF fitted to width of PictureBox
            double xpos = ((double)e.X / (double)pictureBox1.Width) * qp.PageWidth();
            double ypos = qp.PageHeight() - ((double)e.Y / (double)pictureBox1.Width) * qp.PageWidth();

            qp.SetTextSize(24);
            qp.SetTextColor(1, 0, 0);
            qp.DrawText(xpos, ypos, "A");
            qp.SaveToFile(NewFileName);
            ShowPDF(NewFileName);
        }