https://bugs.freedesktop.org/show_bug.cgi?id=59310

--- Comment #1 from Owen Genat <[email protected]> ---
Created attachment 89731
  --> https://bugs.freedesktop.org/attachment.cgi?id=89731&action=edit
ODG/EPS/PNG test files for setmiterlimit, created under v3304 and v4132.

I can confirm this bug, at least in terms of ghostscript behaviour. It does
appear that EPS files generated from Draw are in violation of the Adobe EPS
file format specification v3.0:

- http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf

There does not seem to be anything explicit in the spec about the setmiterlimit
needing to be anything other than (p.15):

> 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 
> setdash newpath

Using the instructions provided in comment#0, I created a pair of test ODGs
(refer attached) under Ubuntu 10.04 x86_64 running:

- v3.3.0.4 OOO330m19 Build: 6
- v4.1.3.2 Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

I then exported the line in each to EPS, layer 2, color. These are the "0ml"
files attached and contain these lines:

> 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 
> setdash newpath
> ...
> /ml {setmiterlimit} bdef
> ...
> 0 lw 0 ml 0.003 0.003 0.003 c 2000 2000 m  3000 3000 l  2000 4000 l  ps

A diff of the v3304 and v4132 0ml EPS reveals no significant changes:

$ diff v3304_0ml.eps v4132_0ml.eps 
4c4
< %%Creator: Sun Microsystems, Inc.
---
> %%Creator: LibreOffice 4.1
53,54c53,54
< 0.02791 0.02845 s 
< 0 -2003 t
---
> 0.02797 0.02848 s 
> 0 -2001 t
57c57
< -1999 -1999 t 
---
> -1995 -1997 t 
59,60c59,60
< 0 lw 0 ml 0.003 0.003 0.003 c 2000 2000 m  3000 3000 l  2000 4000 l  ps
< 0 2003 t 
---
> 0 lw 0 ml 0.003 0.003 0.003 c 1996 1998 m  2994 2997 l  1996 3996 l  ps
> 0 2001 t 

I edited the 0ml versions to change the "0 ml" toward the end to read "1 ml"
and save these as the 1ml_edited versions of each EPS. Ghostscript reports:

$ gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -dGraphicsAlphaBits=4
-sOutputFile=v3304_0ml.png v3304_0ml.eps 
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Error: /rangecheck in --setmiterlimit--
Operand stack:
   --nostringval--   0
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--  
--nostringval--   2   %stopped_push   --nostringval--   --nostringval--  
--nostringval--   false   1   %stopped_push   1878   1   3   %oparray_pop  
1877   1   3   %oparray_pop   --nostringval--   1861   1   3   %oparray_pop  
1755   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2  
--nostringval--   --nostringval--   --nostringval--   2   %stopped_push  
--nostringval--
Dictionary stack:
   --dict:1157/1684(ro)(G)--   --dict:0/20(G)--   --dict:104/200(L)--  
--dict:104/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 1600
GPL Ghostscript 8.71: Unrecoverable error, exit code 1

$ gs -dSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=png16m -dGraphicsAlphaBits=4
-sOutputFile=v3304_1ml_edited.png v3304_1ml_edited.eps 
GPL Ghostscript 8.71 (2010-02-10)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.

The results are the same for the v4132 EPSs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to