From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/108004 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Re: Minimum METAPOST code produces problematic PDF Date: Thu, 9 Jul 2020 14:07:39 +0200 Message-ID: <70BB305F-BF84-4757-85CC-E0C52D585229@rna.nl> References: <4d1e9138-6bca-987c-6ff1-f31270d15c56@xs4all.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============3198127802020088852==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39549"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jul 09 14:08:11 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtVLW-000AAx-UC for gctc-ntg-context-518@m.gmane-mx.org; Thu, 09 Jul 2020 14:08:10 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C9D36185764; Thu, 9 Jul 2020 14:07:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s_Iw_Lp8dRqP; Thu, 9 Jul 2020 14:07:43 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1ED1618575D; Thu, 9 Jul 2020 14:07:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5985918575C for ; Thu, 9 Jul 2020 14:07:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GsXRCebSZPln for ; Thu, 9 Jul 2020 14:07:41 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 76C02185738 for ; Thu, 9 Jul 2020 14:07:41 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id 61DBB54553CB for ; Thu, 9 Jul 2020 14:07:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1594296459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5YPbdRJMnlWuOPfcMWLKZdKBylne796K/H2E6Sw/hKc=; b=n9IRdOGkJuk0y8qIvX4aLtBkRK4pdILys5BfsAbY8JA5B4h9swN9aokMnq6Ui4DjHhTzNd tP1U8bF7a2EKTh7ncopqMSrT6h3B1smJ644VcF5hD03JrqJuxWv9gpukVdWDPhowqR0eVe Zv/mMafwyN9uVS2+Of+ldYJ0BOt6RSk+Zy3nqXwblWoKsV9KN8v5OT/+uy/OnCXlFX7Sna MQGPINtcxdX//yd4Nl9UHYxyjrsG2cMRfZnHssWqXg67/kG3bnQbZn99i4YQK6393nqiuF y9ZZcgKg2YPAC5wt7A/437zRv+6zslPBpMNjx+6ql7EkTjP1vxhIG63whKBxAw== In-Reply-To: <4d1e9138-6bca-987c-6ff1-f31270d15c56@xs4all.nl> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:108004 Archived-At: --===============3198127802020088852== Content-Type: multipart/alternative; boundary="Apple-Mail=_45E109FA-85BA-404F-92A0-EA60CD81091A" --Apple-Mail=_45E109FA-85BA-404F-92A0-EA60CD81091A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 The minimum is a relative one: It is page 650 in the (normative) Annex C Implementation Limits for PDF = readers and writers: Additionally, conforming writers should adhere to the following = constraints, and conforming readers should accommodate PDF files that = obey the constraints.=20 The minimum page size should be 3 by 3 units in default user space; the = maximum should be 14,400 by 14,400 units. In versions of PDF earlier = than 1.6, the size of the default user space unit was fixed at 1=E2=81=847= 2 inch, yielding a minimum of approximately 0.04 by 0.04 inch and a = maximum of 200 by 200 inches. Beginning with PDF 1.6, the size of the = unit may be set on a page-by-page basis; the default remains at 1/ 72 = inch.=20 In other words: you need to change the unit per page so the page is at = least 3x3 and maximally 14400x14400. > On 9 Jul 2020, at 12:10, Hans Hagen wrote: >=20 > On 7/9/2020 9:08 AM, Taco Hoekwater wrote: >>> On 9 Jul 2020, at 08:32, Hans Hagen wrote: >>>=20 >>> On 7/8/2020 8:14 PM, Gerben Wierda wrote: >>>> I found out this in the PDF spec: >>>> The minimum page size should be 3 by 3 units in default user space; = the >>>=20 >>> I never noticed that ... what section/paragraph in the spec? >> It=E2=80=99s in the implementation limits for Acrobat, not in the = normative section. >=20 > Great. That used to be 1 bp so now it's more. As it happens, we do = have a check for this in context so we can adapt it ... but, as this 3 = bp is kind of arbitrary and because 3 bp becomes a float and thereby = ends up slightly less than the integer 3 we can best play safe and = revert to the usual tex joke, so i now set the minumum to >=20 > \luaexpr{math.pi}\onebasepoint >=20 > which then gives: >=20 > /MediaBox [ 0 0 3.141539539 3.141539539 ] because after all, any = rediculous minimum will do and that way a user can still figure out that = it's a value set by context. >=20 > Hans >=20 > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > ----------------------------------------------------------------- > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > maillist : ntg-context@ntg.nl / = http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > = __________________________________________________________________________= _________ --Apple-Mail=_45E109FA-85BA-404F-92A0-EA60CD81091A Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 The = minimum is a relative one:

It is page 650 in the (normative) Annex C = Implementation Limits for PDF readers and writers:

Additionally, = conforming writers should adhere to the following constraints, and = conforming readers should accommodate PDF files that obey the = constraints. 
  • The = minimum page size should be 3 by 3 units in default user space; the = maximum should be 14,400 by 14,400 units. In versions of PDF earlier = than 1.6, the size of the default user space unit was fixed at = 1=E2=81=8472 inch, yielding a minimum of = approximately 0.04 by 0.04 inch and a maximum of 200 by 200 inches. = Beginning with PDF 1.6, the size of the unit may be set on a = page-by-page basis; the default remains at 1/ 72 = inch. 

In= other words: you need to change the unit per page so the page is at = least 3x3 and maximally 14400x14400.


On 9 Jul 2020, at 12:10, Hans Hagen <j.hagen@xs4all.nl> = wrote:

On 7/9/2020 9:08 AM, Taco Hoekwater wrote:
On 9 Jul 2020, at 08:32, Hans Hagen <j.hagen@xs4all.nl> = wrote:

On 7/8/2020 8:14 PM, Gerben Wierda = wrote:
I found out = this in the PDF spec:
The minimum page size should be 3 by = 3 units in default user space; the

I never noticed that ... what section/paragraph in the = spec?
It=E2=80=99s in the implementation = limits for Acrobat, not in the normative section.

Great. That used to be 1 bp so = now it's more. As it happens, we do have a check for this in context so = we can adapt it ... but, as this 3 bp is kind of arbitrary and because 3 = bp becomes a float and thereby ends up slightly less than the integer 3 = we can best play safe and revert to the usual tex joke, so i now set the = minumum to

=  \luaexpr{math.pi}\onebasepoint

which = then gives:

 /MediaBox [ 0 0 = 3.141539539 3.141539539 ] because after all, any rediculous minimum will = do and that way a user can still figure out that it's a value set by = context.

Hans

---------------------------------------------------------------= --
=             &n= bsp;           &nbs= p;            =     Hans Hagen | PRAGMA ADE
=             &n= bsp;Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
=       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
---------------------------------------------------------------= --
_______________________________________________________________= ____________________
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://context.aanhet.net
archive  : = https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
_______________________________________________________________= ____________________

= --Apple-Mail=_45E109FA-85BA-404F-92A0-EA60CD81091A-- --===============3198127802020088852== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3198127802020088852==--