I have an exe which block many screen capturing utilities. My PDF itself is blocked and no one can copy text from it, I want to embed that exe file into my pdf and by running pdf file that exe executes automatically.

How to do this?


This can not be done. An executable file can not be embedded in a PDF file. This would allow viruses, trojans, backdoors, rootkits, etc. to take over machines. It would be the most major security hole possible.

For the sake of argument, lets say you could do this (and you definitely can not) .EXEs would only run on Windows machines (and not every Windows machine may be able to run it). It would not work on Macs, Linux, Unix, or any other OS. Also, no one in their right mind would ever use a PDF for fear it would infect their machine.

On a side note, locked PDFs can be easily broken. Also, there is always a way to do a screen capture, like capturing the screen buffer for example. Even if you could prevent a screen capture, all one would have to do is run the program in a VM and capture the screen from the host. Simply put, no matter what file type or forms of protection are in place the data can be copied. If the data is viewable by someone, then the data is copyable.


You can't automatically execute an EXE file with a PDF, that would be a huge security issue. You would have to find some exploit which would be detected by anti-virus software etc. in order to do so.


As an alternative solution; I'd look in to embedding the PDF within an application that achieves such an effect. Instead of distributing the PDF, you'd just give them the .exe.

  • that exploit was closed years ago.
    – Keltari
    Jan 21 '13 at 12:42
  • Removed offending link
    – Sam
    Jan 21 '13 at 12:45
  • an exe wont work for the many reasons listed in my answer. simply put, he can not do what he is asking.
    – Keltari
    Jan 21 '13 at 12:53

Let's say both of test.exe and test.pdf files are in the c:\ directory.

So, to embed the exe file in pdf file open cmd as administrator:

type c:\test.exe > test.pdf:test.exe

To run the exe file from pdf open cmd as administrator:

start c:\test.pdf:text.exe

That's it.

  • 1
    This doesn't do what you claim it does. Mar 5 '16 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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