ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Gerben Wierda <gerben.wierda@rna.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Minimum METAPOST code produces problematic PDF
Date: Thu, 9 Jul 2020 14:07:39 +0200	[thread overview]
Message-ID: <70BB305F-BF84-4757-85CC-E0C52D585229@rna.nl> (raw)
In-Reply-To: <4d1e9138-6bca-987c-6ff1-f31270d15c56@xs4all.nl>


[-- Attachment #1.1: Type: text/plain, Size: 2793 bytes --]

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⁄72 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’s 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
> 
> -----------------------------------------------------------------
>                                          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!
> 
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 5199 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

  reply	other threads:[~2020-07-09 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07 22:49 Gerben Wierda
2020-07-07 23:08 ` Jairo A. del Rio
2020-07-08 18:14   ` Gerben Wierda
2020-07-09  6:32     ` Hans Hagen
     [not found]       ` <FA33AC5F-7924-460A-9669-2E14687A0745@elvenkind.com>
2020-07-09 10:10         ` Hans Hagen
2020-07-09 12:07           ` Gerben Wierda [this message]
2020-07-09  6:37     ` Aditya Mahajan
2020-07-11 12:22       ` Gerben Wierda

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=70BB305F-BF84-4757-85CC-E0C52D585229@rna.nl \
    --to=gerben.wierda@rna.nl \
    --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).