ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Rolf <indiego@gmx.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Unwanted information in PDF files
Date: Wed, 12 Dec 2007 14:18:58 +0100	[thread overview]
Message-ID: <475FDFC2.9050609@gmx.net> (raw)
In-Reply-To: <fjnl8j$ko9$1@ger.gmane.org>

Maurí­cio schrieb:
> Hi,
> 
> After generating a PDF from a .tex file,
> I changed the name of the resulting PDF to
> something else. But when I open that file in
> 'evince', it still shows the old file name.
> 
> I opened that file in emacs in saw that I lot
> of info is stored in the PDF file: original file
> name, creation date, "generated by Context" etc.
>
Hit Ctrl-D in Acrobat (while viewing the document),
tabs "Description" and "Custom"...

> That can be a problem sometimes. For instance,
> someone wouldn't want to write a file like
> 'I_hate_my_job.tex' and then change the result
> to 'report_to_boss.pdf', just to see his manager
> opening the file and reading the first name. Or,
> in my situation, write a file with special
> Unicode characters and see evince show the file
> name as bogus characters.
>
Not the best example, but in general I agree. In my special case I don't
want the overhead for smaler standalone metapost graphics (for inclusion
only).

> How can I instruct Context not to write anything
> inside the PDF file that I have not asked for?
>
There is currently no interface for this. But you are free (with the
risk of breaking things now or in the future) to change the code for
your needs.


Add this to a standalone file (reporttoboss.tex?) for inclusion and
comment the info you don't want:

\unprotect
% code taken from spec-fdf.tex

\def\doPDFsetupidentity#1#2#3#4#5#6%
  {\bgroup
   \enablePDFdocencoding
   \edef\!!stringa{#5}%
   \ifx\!!stringa\empty \ifx\pdfdate\undefined\else
     \edef\!!stringa{D:\pdfdate}%
   \fi \fi
   \expanded{\doPDFaddtoinfo
     {/Title (#1)
      /Subject (#2)
      /Author (#3)
      /Creator (#4)
      /ModDate (\!!stringa)
%%      /ID (\jobname.\!!stringa) % needed for pdf/x
      /Keywords (#6)}}%
   \egroup}


\def\addPDFdocumentinfo
  {\doPDFaddtocatalog{\currentPDFpagemode\currentPDFviewerprefs}%
   \doPDFaddtocatalog{/Version \ifdim\PDFversion00\points>100\points
1.\fi\PDFversion}%
   \doPDFaddtoinfo{/Trapped /False}% !leave unchanged!
   \doPDFaddtoinfo{/ConTeXt.Version (\contextversion)}%
   \doPDFaddtoinfo{/ConTeXt.Time
(\number\normalyear.\twodigits\normalmonth.\twodigits\normalday\space
\twodigits\currenthour:\twodigits\currentminute)}%
%%   \doPDFaddtoinfo{/ConTeXt.Jobname (\jobname)}%
   \doPDFaddtoinfo{/ConTeXt.Url     (www.pragma-ade.com)}}

\protect
\endinput

See the pdf reference manual for more details. And better check from
time to time if things have changed. This is ConTeXt ;)


Regards, Peter


> Thanks,
> Maurício
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2007-12-12 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12  3:41 Maurí­cio
2007-12-12 11:55 ` Wolfgang Schuster
2007-12-12 13:18 ` Peter Rolf [this message]
2007-12-12 14:14   ` Martin Schröder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=475FDFC2.9050609@gmx.net \
    --to=indiego@gmx.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).