Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
" 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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.