tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: remove private information from user documents
Date: Sun, 27 Feb 2011 23:40:06 +0100	[thread overview]
Message-ID: <20110227224006.GF12815@iris.usta.de> (raw)
In-Reply-To: <20110227193520.GA20226@britannica.bec.de>

Hi Joerg,

Joerg Sonnenberger wrote on Sun, Feb 27, 2011 at 08:35:20PM +0100:
> On Sun, Feb 27, 2011 at 08:14:39PM +0100, Ingo Schwarze wrote:

>> Theo noticed that mandoc(1) includes information about itself
>> into PostScript and PDF documents it creates.

> Like pretty much every other program that creates either format.

Wow, indeed, even basic tools like a2ps, dvips, pdflatex do that;
i never noticed, which, somehow, proves my point that this is done
behind the back of the user, doesn't it?

Besides, "everybody does that" doesn't sound like a particularly
convincing argument...

>> I don't like that.  Basically, what software i'm running, and which
>> version, is private information about myself.  I don't expect such
>> information to end up in documents i'm creating.

> I somewhat disagree. I don't care much about the version number,
> but at least the creation program is useful enough.

What for, in particular from the point of view of the author?

For interpreting the format?
It shouldn't matter, these formats are standardized.
And even if it does matter, a parser using the Creator
information to disambiguate would be an awful kludge.

For which other reason should that matter?

And do these other reasons really outweigh the privacy argument?

> I'm not sure whether the field is required by the specification
> for the preamble or not, but I think it should be kept.

Regarding the comments in the PostScript preample, i can't find
any specification whatsoever, the strings used there seem to be
mere convention, even for stuff like %%Pages: (atend), the PostScript
language reference doesn't mention anything about these comments,
as far as i can see.

Regarding the Document Information Directory in PDF files,
according to the PDF 1.7 specification, both the presence of
the directory and all of its content are optional.  My patch
only removed the directory but not the reference to it;
according to the standard, that is not an error, as a reference
to a non-existant object refers to the null object.  However,
mandoc handles the deleted object incorrectly in the xref table
in three ways: The 0th enty in the xref table does not point to the
deleted object, the deleted object is not marked as deleted,
and its generation number is not incremented.  Thus, we should
rather not remove the object but just its content, keeping the
empty object.

So, i'm including an updated patch.

By the way, in case we want to keep this information - i still
don't understand why it is useful, and i still regard it as
potentially harmful - we should at least change the name for
PDF from "/Creator" to "/Producer", see Table 317 on page 550
of the PDF 1.7 standard.

Yours,
  Ingo


Index: term_ps.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/term_ps.c,v
retrieving revision 1.14
diff -u -p -r1.14 term_ps.c
--- term_ps.c	31 Jan 2011 02:36:55 -0000	1.14
+++ term_ps.c	27 Feb 2011 22:33:22 -0000
@@ -788,7 +788,6 @@ ps_begin(struct termp *p)
 
 	if (TERMTYPE_PS == p->type) {
 		ps_printf(p, "%%!PS-Adobe-3.0\n");
-		ps_printf(p, "%%%%Creator: mandoc-%s\n", VERSION);
 		ps_printf(p, "%%%%CreationDate: %s", ctime(&t));
 		ps_printf(p, "%%%%DocumentData: Clean7Bit\n");
 		ps_printf(p, "%%%%Orientation: Portrait\n");
@@ -808,7 +807,6 @@ ps_begin(struct termp *p)
 		ps_printf(p, "%%PDF-1.1\n");
 		pdf_obj(p, 1);
 		ps_printf(p, "<<\n");
-		ps_printf(p, "/Creator mandoc-%s\n", VERSION);
 		ps_printf(p, ">>\n");
 		ps_printf(p, "endobj\n");
 
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

  reply	other threads:[~2011-02-27 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27 19:14 Ingo Schwarze
2011-02-27 19:35 ` Joerg Sonnenberger
2011-02-27 22:40   ` Ingo Schwarze [this message]
2011-03-06 23:59     ` Kristaps Dzonsons
2011-02-28  0:30 ` Anthony J. Bentley

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=20110227224006.GF12815@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /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).