Skip to main content
This topic has been closed for replies.

1 reply

lrosenth
Adobe Employee
Adobe Employee
December 11, 2016

AFAIK, we use the standard clipboard for everything. What makes you think it does not?

Known Participant
December 11, 2016

I first made sure the clipboard was clear by rebooting the computer.  I then opened a PDF in Acrobat X that contained some "Ovals" I'd drawn and some things I'd created with the typewriter tool.  I selected some of them, copied them to the clipboard, then pasted them back into the same document and another PDF document a few times just to make sure everything was working okay, which it was. I then ran my program below several times and retried pasting into both documents again, and it worked, which indicated to me that the clipboard was not getting cleared.  I then rebooted again, selected some original text in the PDF document, copied it to the clipboard, and pasted it into a text file via Notepad++, which worked.  Finally I ran my program again and tried pasting again which, as expected, didn't work.  Thus, it seems that there is something odd about the way the clipboard is being handled for non-text objects.  I'm using Win10 Pro 64-bit with all the latest updates and an i7 CPU with plenty of RAM and disk space.

using System;
using System.Windows.Forms;
namespace MyApp
{
   class Program
   {
      [STAThread]
      static void Main(string[] args)
      {
         try
         {
            Clipboard.Clear();
         }
         catch (Exception ex)
         {
            string msg = ex.Message;
         }
      }
   }
}
lrosenth
Adobe Employee
Adobe Employee
December 11, 2016

I suspect that you simply don’t know what type is being used to store the data. Depending on what is being copied, it may be in PDF format or in a private format Either way, it is a perfectly valid clipboard entry – just not text. If you use some of the window debugging tools you might be able to find out more…