TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. 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

This question already has an answer here:

I am trying to save the LaTeX code needed for generating some document in the document itself as metadata. So far I found the command to set the pdf metadata using the hyperref package but now I am stuck....

This clearly does not work..

% file.tex



Hello world  
share|improve this question

marked as duplicate by diabonas, Werner, Benedikt Bauer, Martin Schröder, barbara beeton Sep 25 '13 at 20:57

This question was marked as an exact duplicate of an existing question.

My guess is that this is not possible but a workaround could be embedding the file as an attachment, using packages as embedfile or attachfile. – Bordaigorl Sep 25 '13 at 15:05
@Bordaigorl thanks I'll take a look. With some Java code I can do this but then I have to run an application after the compilation with LaTeX... not so fast... – Red Sep 25 '13 at 15:09