[Tex/LaTex] Include source code of pdf picture directly into LaTeX file

graphicspdftex

Suppose you have a (PDF)LaTeX file where you include pdf pictures via \includegraphics.

Now, if you want to share the LaTeX file with another person, you always have to send not only the LaTeX file itself but also all the included pdf files containing the pictures. This is pretty inconvenient for recipient.

It would be much more comfortable to copy the pdf source code right into the LaTeX file so that only one file has to be sent. Is that possible?

Best Answer

Most recipients shouldn't find it inconvenient to receive a zip file of all the needed files?

The alternative would be to (for example) base64 encode the pdf file so it is all safe characters and put it in a filecontents environment in the latex file and then specify a graphic rule which base64 decodes the file that latex will then write. But then you have to make sure the recipient's latex setup allows calling external scripts (and that they have a necessary decoder) which is harder to setup usually than simply unzipping an archive.

Related Question