ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Unwanted information in PDF files
@ 2007-12-12  3:41 Maurí­cio
  2007-12-12 11:55 ` Wolfgang Schuster
  2007-12-12 13:18 ` Peter Rolf
  0 siblings, 2 replies; 4+ messages in thread
From: Maurí­cio @ 2007-12-12  3:41 UTC (permalink / raw)
  To: ntg-context

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.

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.

How can I instruct Context not to write anything
inside the PDF file that I have not asked for?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unwanted information in PDF files
  2007-12-12  3:41 Unwanted information in PDF files Maurí­cio
@ 2007-12-12 11:55 ` Wolfgang Schuster
  2007-12-12 13:18 ` Peter Rolf
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2007-12-12 11:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/12/12, Maurí­cio <briqueabraque@yahoo.com>:
> 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.
>
> 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.
>
> How can I instruct Context not to write anything
> inside the PDF file that I have not asked for?
>
> Thanks,
> Maurício

\setupinteraction[title=...]

Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unwanted information in PDF files
  2007-12-12  3:41 Unwanted information in PDF files Maurí­cio
  2007-12-12 11:55 ` Wolfgang Schuster
@ 2007-12-12 13:18 ` Peter Rolf
  2007-12-12 14:14   ` Martin Schröder
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Rolf @ 2007-12-12 13:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Unwanted information in PDF files
  2007-12-12 13:18 ` Peter Rolf
@ 2007-12-12 14:14   ` Martin Schröder
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Schröder @ 2007-12-12 14:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/12/12, Peter Rolf <indiego@gmx.net>:
>    \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)}}

While this is a nice idea, prefixes for additional keys in the info
dict should be registered with Adobe to avoid name clashes; see
appendix E of the PDF reference.

Best
   Martin
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-12 14:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-12  3:41 Unwanted information in PDF files Maurí­cio
2007-12-12 11:55 ` Wolfgang Schuster
2007-12-12 13:18 ` Peter Rolf
2007-12-12 14:14   ` Martin Schröder

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).