ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Minimum METAPOST code produces problematic PDF
@ 2020-07-07 22:49 Gerben Wierda
  2020-07-07 23:08 ` Jairo A. del Rio
  0 siblings, 1 reply; 8+ messages in thread
From: Gerben Wierda @ 2020-07-07 22:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

The following code:

\startMPpage[instance=doublefun]
  draw (0,0)--(100,0) dashed withdots;
\stopMPpage

When run through LuaMetaTeX produces a PDF about which Acrobat complains:

	The dimensions of this page are out-of-range. Page content might be truncated.

and Adobe InDesign cannot handle it at all (displays empty). 

The error message stays with

\startMPpage[instance=doublefun]
  draw (0,0)--(100,0)—(100,2) dashed withdots;
\stopMPpage

but disappears with

\startMPpage[instance=doublefun]
  draw (0,0)--(100,0)—(100,3) dashed withdots;
\stopMPpage


Additionally, on the Adobe forums I have been told:

	Also, the color space is device gray (not RGB or CMYK)

which might be a more generic problem with LMTX output, I don’t know. It might also be an Adobe problem. Previw.app on macOS handles the result without problems.

ConTeXt standalone:

This is LuaMetaTeX, Version 2.06.02 
open source     > level 1, order 1, name 'cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2020.05.12 16:21 MKIV beta  fmt: 2020.5.16  int: english/english


G



[-- Attachment #1.2: Type: text/html, Size: 3439 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
___________________________________________________________________________________

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

* Re: Minimum METAPOST code produces problematic PDF
  2020-07-07 22:49 Minimum METAPOST code produces problematic PDF Gerben Wierda
@ 2020-07-07 23:08 ` Jairo A. del Rio
  2020-07-08 18:14   ` Gerben Wierda
  0 siblings, 1 reply; 8+ messages in thread
From: Jairo A. del Rio @ 2020-07-07 23:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Evince and Okular (Linux) open the PDF output without warnings nor issues.

Jairo :)

El mar., 7 de jul. de 2020 a la(s) 17:50, Gerben Wierda (
gerben.wierda@rna.nl) escribió:

> The following code:
>
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0) dashed withdots;
> \stopMPpage
>
> When run through LuaMetaTeX produces a PDF about which Acrobat complains:
>
> The dimensions of this page are out-of-range. Page content might be
> truncated.
>
> and Adobe InDesign cannot handle it at all (displays empty).
>
> The error message stays with
>
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0)—(100,2) dashed withdots;
> \stopMPpage
>
> but disappears with
>
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0)—(100,3) dashed withdots;
> \stopMPpage
>
>
> Additionally, on the Adobe forums I have been told:
>
> Also, the color space is device gray (not RGB or CMYK)
>
> which might be a more generic problem with LMTX output, I don’t know. It
> might also be an Adobe problem. Previw.app on macOS handles the result
> without problems.
>
> ConTeXt standalone:
>
> This is LuaMetaTeX, Version 2.06.02
> open source     > level 1, order 1, name 'cont-yes.mkiv'
> system          >
> system          > ConTeXt  ver: 2020.05.12 16:21 MKIV beta  fmt:
> 2020.5.16  int: english/english
>
>
> G
>
>
>
> ___________________________________________________________________________________
> 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: 3960 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
___________________________________________________________________________________

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

* Re: Minimum METAPOST code produces problematic PDF
  2020-07-07 23:08 ` Jairo A. del Rio
@ 2020-07-08 18:14   ` Gerben Wierda
  2020-07-09  6:32     ` Hans Hagen
  2020-07-09  6:37     ` Aditya Mahajan
  0 siblings, 2 replies; 8+ messages in thread
From: Gerben Wierda @ 2020-07-08 18:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

I found out this in the PDF spec:

The minimum page size should be 3 by 3 units in default user space; the maximum should be 14,400 by 14,400 units.

Apparently, Adobe InDesign demands that in a hard way.

G

> On 8 Jul 2020, at 01:08, Jairo A. del Rio <jairoadelrio6@gmail.com> wrote:
> 
> Evince and Okular (Linux) open the PDF output without warnings nor issues.
> 
> Jairo :)
> 
> El mar., 7 de jul. de 2020 a la(s) 17:50, Gerben Wierda (gerben.wierda@rna.nl <mailto:gerben.wierda@rna.nl>) escribió:
> The following code:
> 
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0) dashed withdots;
> \stopMPpage
> 
> When run through LuaMetaTeX produces a PDF about which Acrobat complains:
> 
> 	The dimensions of this page are out-of-range. Page content might be truncated.
> 
> and Adobe InDesign cannot handle it at all (displays empty). 
> 
> The error message stays with
> 
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0)—(100,2) dashed withdots;
> \stopMPpage
> 
> but disappears with
> 
> \startMPpage[instance=doublefun]
>   draw (0,0)--(100,0)—(100,3) dashed withdots;
> \stopMPpage
> 
> 
> Additionally, on the Adobe forums I have been told:
> 
> 	Also, the color space is device gray (not RGB or CMYK)
> 
> which might be a more generic problem with LMTX output, I don’t know. It might also be an Adobe problem. Previw.app on macOS handles the result without problems.
> 
> ConTeXt standalone:
> 
> This is LuaMetaTeX, Version 2.06.02 
> open source     > level 1, order 1, name 'cont-yes.mkiv'
> system          > 
> system          > ConTeXt  ver: 2020.05.12 16:21 MKIV beta  fmt: 2020.5.16  int: english/english
> 
> 
> G
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/>
> wiki     : http://contextgarden.net <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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 6755 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
___________________________________________________________________________________

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

* Re: Minimum METAPOST code produces problematic PDF
  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  6:37     ` Aditya Mahajan
  1 sibling, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2020-07-09  6:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Gerben Wierda

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?

> maximum should be 14,400 by 14,400 units.

So we should bump tex's maxima ...

> Apparently, Adobe InDesign demands that in a hard way.
Or maybe it just cannot handle zero's. The last time I ever ran into an 
issue was that a scale should not be zero (so we always have 0.00001 at 
least). But I only have an old acrobat professional so I can't check the 
latest demands.

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
___________________________________________________________________________________

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

* Re: Minimum METAPOST code produces problematic PDF
  2020-07-08 18:14   ` Gerben Wierda
  2020-07-09  6:32     ` Hans Hagen
@ 2020-07-09  6:37     ` Aditya Mahajan
  2020-07-11 12:22       ` Gerben Wierda
  1 sibling, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2020-07-09  6:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 8 Jul 2020, 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 maximum should be 14,400 by 14,400 units.

So, does the following work:

\startMPpage[instance=doublefun, offset=2pt]
   draw (0,0)--(100,0) dashed withdots;
\stopMPpage

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

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

* Re: Minimum METAPOST code produces problematic PDF
       [not found]       ` <FA33AC5F-7924-460A-9669-2E14687A0745@elvenkind.com>
@ 2020-07-09 10:10         ` Hans Hagen
  2020-07-09 12:07           ` Gerben Wierda
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2020-07-09 10:10 UTC (permalink / raw)
  To: Taco Hoekwater; +Cc: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: Minimum METAPOST code produces problematic PDF
  2020-07-09 10:10         ` Hans Hagen
@ 2020-07-09 12:07           ` Gerben Wierda
  0 siblings, 0 replies; 8+ messages in thread
From: Gerben Wierda @ 2020-07-09 12:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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

* Re: Minimum METAPOST code produces problematic PDF
  2020-07-09  6:37     ` Aditya Mahajan
@ 2020-07-11 12:22       ` Gerben Wierda
  0 siblings, 0 replies; 8+ messages in thread
From: Gerben Wierda @ 2020-07-11 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> On 9 Jul 2020, at 08:37, Aditya Mahajan <adityam@umich.edu> wrote:
> 
> On Wed, 8 Jul 2020, 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 maximum should be 14,400 by 14,400 units.
> 
> So, does the following work:
> 
> \startMPpage[instance=doublefun, offset=2pt]
>  draw (0,0)--(100,0) dashed withdots;
> \stopMPpage

Yes.

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

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

end of thread, other threads:[~2020-07-11 12:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 22:49 Minimum METAPOST code produces problematic PDF 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
2020-07-09  6:37     ` Aditya Mahajan
2020-07-11 12:22       ` Gerben Wierda

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