Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a program in which I managed to copy content as PDF to the clipboard using some undocumented functionality. Unfortunately this data is note pasteable even to programs that accept PDF. I managed to use this program to find that it can be made pasteable by changing the description (or type) from "PDF" to "Portable Document Format" (see screenshot below). Unfortunately this program also corrupts the data when doing this. (I think this is because the data is binary and not text)

How can I change the description/type of the Windows clipboard data without changing the (binary) data itself?

Mathematica graphics

My previous related question: How to access raw clipboard data on Windows?

share|improve this question
" using some undocumented functionality" --- there's a reason why it's undocumented Snd you're seeing the effects of it – Sathya Jan 15 '12 at 2:31
@Sathya What is wrong with trying to reverse engineer how the program works? Also, my question is not about that functionality, but about how the clipboard works. – Szabolcs Jan 15 '12 at 7:55

It’s not possible. Data in the clipboard are OLE objects.

share|improve this answer
I am not familiar with OLE objects. Can you elaborate and explain why it's not possible to retrieve the binary data and re-insert it to the clipboard using a different type? In this case it seems the clipboard contents are simply the contents of a PDF file. This program I mentioned will randomly not display the contents properly (see the empty screenshot) event though it does say the size of the data. I need to reinsert this data into the clipboard and call it Portable Document Format rather than PDF. – Szabolcs Jan 14 '12 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .