xsized was the solution.
I wonder why xscaled worked for me for years.

Thanks for the fast help.

Lutz

Am 2. Oktober 2018 11:10:04 MESZ schrieb Hans Hagen <j.hagen@xs4all.nl>:
On 10/2/2018 7:03 AM, Lutz Haseloff wrote:
Hi Hans, hi all,

I think, that recent context has a problem with scaling included pdf files.
My minimal file:

\startMPpage
draw externalfigure "cow.pdf" ;
\stopMPpage

The resulting pdf is, as the original, 97x70.6 mm, all ok.

If I try to scale to the original size, i get arithmetic overflow error.

\startMPpage
draw externalfigure "cow.pdf" xscaled 97mm yscaled 70.6mm ;
\stopMPpage
don't use xscaled, use xsized

if you have

path p ; p := fullcircls scaled 1cm ;

and then do

draw p xscaled 97pt ;

you multiply with a number and only get 97pt width when your p has 1 bp
width

externalfigure has the original dimensions (so no width 1 bp here)

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