Ejemplo n.º 1
0
        private void buttonReadPDF_Click(object sender, EventArgs e)
        {
            int size = -1;
            DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog.
            if (result == DialogResult.OK) // Test result.
            {
                var pdfreader = new ReadPDF();
                var locations = pdfreader.ReadPdfFile(openFileDialog1.FileName);
                var jsonLocations = pdfreader.WriteJson(locations);

                String jsText = GetJsText();
                textBoxResult.Text = jsText.Replace("{0}",jsonLocations).Replace("{1}",openFileDialog1.FileName);

                // Copy the contents of the control to the Clipboard.
                textBoxResult.SelectAll();
                textBoxResult.Copy();
            }
        }
Ejemplo n.º 2
0
        private void buttonReadPDF_Click(object sender, EventArgs e)
        {
            int          size   = -1;
            DialogResult result = openFileDialog1.ShowDialog(); // Show the dialog.

            if (result == DialogResult.OK)                      // Test result.
            {
                var pdfreader     = new ReadPDF();
                var locations     = pdfreader.ReadPdfFile(openFileDialog1.FileName);
                var jsonLocations = pdfreader.WriteJson(locations);

                String jsText = GetJsText();
                textBoxResult.Text = jsText.Replace("{0}", jsonLocations).Replace("{1}", openFileDialog1.FileName);

                // Copy the contents of the control to the Clipboard.
                textBoxResult.SelectAll();
                textBoxResult.Copy();
            }
        }