groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gropdf (1.23.0): incorrect CreationDate/ModDate


From: G. Branden Robinson
Subject: Re: gropdf (1.23.0): incorrect CreationDate/ModDate
Date: Thu, 4 Apr 2024 18:21:37 -0500

Hi Christof,

Thanks for the report.

At 2024-04-04T23:44:25+0200, Christof Meerwald wrote:
> There appear to be two bugs in how gropdf (from 1.23.0) writes the
> CreationDate/ModDate. To demonstrate I am running
> 
>   while sleep 60; do date; echo "" |
>     groff -Z -Tpdf | gropdf | fgrep -a Date; done

The body of this loop can be simplified.

echo | groff -Tpdf | grep -a Date

I can't reproduce this problem with groff 1.23.0.

$ ~/groff-stable/bin/groff --version | head -n 1
GNU groff version 1.23.0
$ echo | SOURCE_DATE_EPOCH=1000000000 ~/groff-stable/bin/groff -Tpdf \
  | grep -a Date
5 0 obj << /CreationDate (D:20010908204640-05'00')
/ModDate (D:20010908204640-05'00')

> I don't think there should be a "+" sign in the last component of the
> dates, it should probably be
> 
>   D:20240404233357+02'00'
> 
> instead of
> 
>   D:20240404233357+02'+00'

I agree that that looks weird.  (On the other hand, ASN.1 date syntax
does not come naturally to me.)  And I _can_ reproduce it with groff
Git.

$ ~/groff-HEAD/bin/groff --version | head -n 1
GNU groff version 1.23.0.1094-94002
$ echo | SOURCE_DATE_EPOCH=1000000000 ~/groff-HEAD/bin/groff -Tpdf | grep -a 
Date
5 0 obj << /CreationDate (D:20010909014640+00'+00')
/ModDate (D:20010909014640+00'+00')

> And I am pretty sure we didn't just switch to summer time at around
> 23:32 here.
> 
> gropdf 1.22.4 doesn't appear to have these bugs.

I infer that you are using a Debian-derived groff package carrying a
patch by Colin Watson that he committed to groff Git shortly after the
1.23.0 release.

https://git.savannah.gnu.org/cgit/groff.git/commit/?id=d7bbfb04ea25a82a8597cdef6ebb391cb78ab47c

Colin, can you double-check whether you're producing a date format
conformant with ยง7.9.4 of ISO 32000?  I'm attaching the relevant pages
of Adobe's gratis version of the standard.

Regards,
Branden

Attachment: pdf_date_format.pdf
Description: pdf_date_format.pdf

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]