mgieseki / dvisvgm

A fast DVI, EPS, and PDF to SVG converter
https://dvisvgm.de
GNU General Public License v3.0
307 stars 34 forks source link

EPS file not converting correctly. #49

Closed FGasper closed 8 years ago

FGasper commented 8 years ago

The following EPS file converts incorrectly when using the dvisvgm version from MacPorts (1.5.2_1):

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: xpdf/pdftops 3.00
%%LanguageLevel: 2
%%BoundingBox: 0 0 181 36
%%DocumentSuppliedResources: (atend)
%%EndComments
%%BeginProlog
%%BeginResource: procset xpdf 3.00 0
/xpdf 75 dict def xpdf begin
% PDF special state
/pdfDictSize 15 def
/pdfSetup {
  3 1 roll 2 array astore
  /setpagedevice where {
    pop 3 dict begin
      /PageSize exch def
      /ImagingBBox null def
      /Policies 1 dict dup begin /PageSize 3 def end def
      { /Duplex true def } if
    currentdict end setpagedevice
  } {
    pop pop
  } ifelse
} def
/pdfStartPage {
  pdfDictSize dict begin
  /pdfFillCS [] def
  /pdfFillXform {} def
  /pdfStrokeCS [] def
  /pdfStrokeXform {} def
  /pdfFill [0] def
  /pdfStroke [0] def
  /pdfFillOP false def
  /pdfStrokeOP false def
  /pdfLastFill false def
  /pdfLastStroke false def
  /pdfTextMat [1 0 0 1 0 0] def
  /pdfFontSize 0 def
  /pdfCharSpacing 0 def
  /pdfTextRender 0 def
  /pdfTextRise 0 def
  /pdfWordSpacing 0 def
  /pdfHorizScaling 1 def
  /pdfTextClipPath [] def
} def
/pdfEndPage { end } def
% PDF color state
/cs { /pdfFillXform exch def dup /pdfFillCS exch def
      setcolorspace } def
/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def
      setcolorspace } def
/sc { pdfLastFill not { pdfFillCS setcolorspace } if
      dup /pdfFill exch def aload pop pdfFillXform setcolor
     /pdfLastFill true def /pdfLastStroke false def } def
/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if
      dup /pdfStroke exch def aload pop pdfStrokeXform setcolor
     /pdfLastStroke true def /pdfLastFill false def } def
/op { /pdfFillOP exch def
      pdfLastFill { pdfFillOP setoverprint } if } def
/OP { /pdfStrokeOP exch def
      pdfLastStroke { pdfStrokeOP setoverprint } if } def
/fCol {
  pdfLastFill not {
    pdfFillCS setcolorspace
    pdfFill aload pop pdfFillXform setcolor
    pdfFillOP setoverprint
    /pdfLastFill true def /pdfLastStroke false def
  } if
} def
/sCol {
  pdfLastStroke not {
    pdfStrokeCS setcolorspace
    pdfStroke aload pop pdfStrokeXform setcolor
    pdfStrokeOP setoverprint
    /pdfLastStroke true def /pdfLastFill false def
  } if
} def
% build a font
/pdfMakeFont {
  4 3 roll findfont
  4 2 roll matrix scale makefont
  dup length dict begin
    { 1 index /FID ne { def } { pop pop } ifelse } forall
    /Encoding exch def
    currentdict
  end
  definefont pop
} def
/pdfMakeFont16 {
  exch findfont
  dup length dict begin
    { 1 index /FID ne { def } { pop pop } ifelse } forall
    /WMode exch def
    currentdict
  end
  definefont pop
} def
% graphics state operators
/q { gsave pdfDictSize dict begin } def
/Q {
  end grestore
  /pdfLastFill where {
    pop
    pdfLastFill {
      pdfFillOP setoverprint
    } {
      pdfStrokeOP setoverprint
    } ifelse
  } if
} def
/cm { concat } def
/d { setdash } def
/i { setflat } def
/j { setlinejoin } def
/J { setlinecap } def
/M { setmiterlimit } def
/w { setlinewidth } def
% path segment operators
/m { moveto } def
/l { lineto } def
/c { curveto } def
/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
      neg 0 rlineto closepath } def
/h { closepath } def
% path painting operators
/S { sCol stroke } def
/Sf { fCol stroke } def
/f { fCol fill } def
/f* { fCol eofill } def
% clipping operators
/W { clip newpath } def
/W* { eoclip newpath } def
% text state operators
/Tc { /pdfCharSpacing exch def } def
/Tf { dup /pdfFontSize exch def
      dup pdfHorizScaling mul exch matrix scale
      pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put
      exch findfont exch makefont setfont } def
/Tr { /pdfTextRender exch def } def
/Ts { /pdfTextRise exch def } def
/Tw { /pdfWordSpacing exch def } def
/Tz { /pdfHorizScaling exch def } def
% text positioning operators
/Td { pdfTextMat transform moveto } def
/Tm { /pdfTextMat exch def } def
% text string operators
/cshow where {
  pop
  /cshow2 {
    dup {
      pop pop
      1 string dup 0 3 index put 3 index exec
    } exch cshow
    pop pop
  } def
}{
  /cshow2 {
    currentfont /FontType get 0 eq {
      0 2 2 index length 1 sub {
        2 copy get exch 1 add 2 index exch get
        2 copy exch 256 mul add
        2 string dup 0 6 5 roll put dup 1 5 4 roll put
        3 index exec
      } for
    } {
      dup {
        1 string dup 0 3 index put 3 index exec
      } forall
    } ifelse
    pop pop
  } def
} ifelse
/awcp {
  exch {
    false charpath
    5 index 5 index rmoveto
    6 index eq { 7 index 7 index rmoveto } if
  } exch cshow2
  6 {pop} repeat
} def
/Tj {
  fCol
  1 index stringwidth pdfTextMat idtransform pop
  sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse
  pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj16 {
  fCol
  2 index stringwidth pdfTextMat idtransform pop
  sub exch div
  pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj16V {
  fCol
  2 index stringwidth pdfTextMat idtransform exch pop
  sub exch div
  0 pdfWordSpacing pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing add 0 exch
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj1 {
  0 pdfTextRise pdfTextMat dtransform rmoveto
  currentpoint 8 2 roll
  pdfTextRender 1 and 0 eq {
    6 copy awidthshow
  } if
  pdfTextRender 3 and dup 1 eq exch 2 eq or {
    7 index 7 index moveto
    6 copy
    currentfont /FontType get 3 eq { fCol } { sCol } ifelse
    false awcp currentpoint stroke moveto
  } if
  pdfTextRender 4 and 0 ne {
    8 6 roll moveto
    false awcp
    /pdfTextClipPath [ pdfTextClipPath aload pop
      {/moveto cvx}
      {/lineto cvx}
      {/curveto cvx}
      {/closepath cvx}
    pathforall ] def
    currentpoint newpath moveto
  } {
    8 {pop} repeat
  } ifelse
  0 pdfTextRise neg pdfTextMat dtransform rmoveto
} def
/TJm { pdfFontSize 0.001 mul mul neg 0
       pdfTextMat dtransform rmoveto } def
/TJmV { pdfFontSize 0.001 mul mul neg 0 exch
        pdfTextMat dtransform rmoveto } def
/Tclip { pdfTextClipPath cvx exec clip newpath
         /pdfTextClipPath [] def } def
% Level 2 image operators
/pdfImBuf 100 string def
/pdfIm {
  image
  { currentfile pdfImBuf readline
    not { pop exit } if
    (%-EOD-) eq { exit } if } loop
} def
/pdfImM {
  fCol imagemask
  { currentfile pdfImBuf readline
    not { pop exit } if
    (%-EOD-) eq { exit } if } loop
} def
/pdfImClip {
  gsave
  0 2 4 index length 1 sub {
    dup 4 index exch 2 copy
    get 5 index div put
    1 add 3 index exch 2 copy
    get 3 index div put
  } for
  pop pop rectclip
} def
/pdfImClipEnd { grestore } def
% shading operators
/colordelta {
  false 0 1 3 index length 1 sub {
    dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt {
      pop true
    } if
  } for
  exch pop exch pop
} def
/funcCol { func n array astore } def
/funcSH {
  dup 0 eq {
    true
  } {
    dup 6 eq {
      false
    } {
      4 index 4 index funcCol dup
      6 index 4 index funcCol dup
      3 1 roll colordelta 3 1 roll
      5 index 5 index funcCol dup
      3 1 roll colordelta 3 1 roll
      6 index 8 index funcCol dup
      3 1 roll colordelta 3 1 roll
      colordelta or or or
    } ifelse
  } ifelse
  {
    1 add
    4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch
    6 index 6 index 4 index 4 index 4 index funcSH
    2 index 6 index 6 index 4 index 4 index funcSH
    6 index 2 index 4 index 6 index 4 index funcSH
    5 3 roll 3 2 roll funcSH pop pop
  } {
    pop 3 index 2 index add 0.5 mul 3 index  2 index add 0.5 mul
    funcCol sc
    dup 4 index exch mat transform m
    3 index 3 index mat transform l
    1 index 3 index mat transform l
    mat transform l pop pop h f*
  } ifelse
} def
/axialCol {
  dup 0 lt {
    pop t0
  } {
    dup 1 gt {
      pop t1
    } {
      dt mul t0 add
    } ifelse
  } ifelse
  func n array astore
} def
/axialSH {
  dup 0 eq {
    true
  } {
    dup 8 eq {
      false
    } {
      2 index axialCol 2 index axialCol colordelta
    } ifelse
  } ifelse
  {
    1 add 3 1 roll 2 copy add 0.5 mul
    dup 4 3 roll exch 4 index axialSH
    exch 3 2 roll axialSH
  } {
    pop 2 copy add 0.5 mul axialCol sc
    exch dup dx mul x0 add exch dy mul y0 add
    3 2 roll dup dx mul x0 add exch dy mul y0 add
    dx abs dy abs ge {
      2 copy yMin sub dy mul dx div add yMin m
      yMax sub dy mul dx div add yMax l
      2 copy yMax sub dy mul dx div add yMax l
      yMin sub dy mul dx div add yMin l
      h f*
    } {
      exch 2 copy xMin sub dx mul dy div add xMin exch m
      xMax sub dx mul dy div add xMax exch l
      exch 2 copy xMax sub dx mul dy div add xMax exch l
      xMin sub dx mul dy div add xMin exch l
      h f*
    } ifelse
  } ifelse
} def
/radialCol {
  dup t0 lt {
    pop t0
  } {
    dup t1 gt {
      pop t1
    } if
  } ifelse
  func n array astore
} def
/radialSH {
  dup 0 eq {
    true
  } {
    dup 8 eq {
      false
    } {
      2 index dt mul t0 add radialCol
      2 index dt mul t0 add radialCol colordelta
    } ifelse
  } ifelse
  {
    1 add 3 1 roll 2 copy add 0.5 mul
    dup 4 3 roll exch 4 index radialSH
    exch 3 2 roll radialSH
  } {
    pop 2 copy add 0.5 mul dt mul t0 add axialCol sc
    exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
    0 360 arc h
    dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
    0 360 arc h f*
  } ifelse
} def
end
%%EndResource
%%EndProlog
%%BeginSetup
xpdf begin
%%BeginResource: font NNOWVO+greciliae
/NNOWVO+greciliae_sfnts [
<00010000000B0080000300306376742000210279000000BC000000046670676D
00000000000000C000000000676C7966CD09E464000000C00000016468656164
03DE960F0000022400000036686865610B83FE5F0000025C00000024686D7478
0376002100000280000000D66C6F63610EFA0EA4000003580000008E6D617870
008C0081000003E8000000207072657000000000000004080000000076686561
000203E90000040800000024766D747803E800000000042C0000011800>
<0021027900>
<000200210000012A029A00030007002EB101002F3CB2070400ED32B10605DC3C
B2030200ED3200B103002F3CB2050400ED32B2070601FC3CB2010200ED323311
211127331123210109E8C7C7029AFD662102580000>
<0001FFFFFFD800A701EF00190000172E0135113436331E011D01272623220614
1633323F011514066C323A3A321C1E0A1D2D1E2A2A1E2E1C0A22280137320146
3235011B15B0091A2C402C180AB1181A00>
<00010000FFDC00A600A90008000037321D01262207353452541B701BA92F9E1C
1C9E2F0000>
<00010000FFC70086005F000B0000373216140F010623223537365F0C1A097604
010149095F0E1D07640105821000000000>
<0002FFFFFFDC00A700AA000A00130000372206141633323635342627321D0126
2207353453182323181B22221C541B701B812234242519192329309E1C1C9E3000>
<00010012000100970088000A00003722061416333236353426531A26261A1D26
2688273828281C1C2700000000>
<00010000000100002912C5925F0F3CF5028B03E800000000CEE8AA5500000000
CEE8AA55FF81F9C904EF06B700000008000000000000000000>
<0001000006B7F9C9005A04EFFF81FF8104EF0001000000000000000000000000
0000002500>
<016C0021000000000000000000A6000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00A6000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000006000000A60000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000012000000>
<0000002A002A002A005200520052005200520052005200520052005200520052
0052006400640064006400640064006400640064006400640064006400640064
0064006400640064007C007C007C007C007C007C007C007C007C007C007C007C
007C007C007C007C007C007C007C007C007C007C007C007C007C007C007C007C
007C007C007C009C009C009C00B2000000>
<0001000000460050000400000000000200000001000100000040002E0000000000>
<0001000000000000000003E80000000000000000000100000000000000000000
0000000100>
<03E8000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000>
] def
10 dict begin
/FontName /NNOWVO+greciliae_00 def
/FontType 42 def
/FontMatrix [1 0 0 1 0 0] def
/FontBBox [-127 -1591 1263 1719] def
/PaintType 0 def
/sfnts NNOWVO+greciliae_sfnts def
/Encoding 256 array
dup 0 /c00 put
dup 1 /c01 put
dup 2 /c02 put
dup 3 /c03 put
dup 4 /c04 put
dup 5 /c05 put
dup 6 /c06 put
dup 7 /c07 put
dup 8 /c08 put
dup 9 /c09 put
dup 10 /c0a put
dup 11 /c0b put
dup 12 /c0c put
dup 13 /c0d put
dup 14 /c0e put
dup 15 /c0f put
dup 16 /c10 put
dup 17 /c11 put
dup 18 /c12 put
dup 19 /c13 put
dup 20 /c14 put
dup 21 /c15 put
dup 22 /c16 put
dup 23 /c17 put
dup 24 /c18 put
dup 25 /c19 put
dup 26 /c1a put
dup 27 /c1b put
dup 28 /c1c put
dup 29 /c1d put
dup 30 /c1e put
dup 31 /c1f put
dup 32 /c20 put
dup 33 /c21 put
dup 34 /c22 put
dup 35 /c23 put
dup 36 /c24 put
dup 37 /c25 put
dup 38 /c26 put
dup 39 /c27 put
dup 40 /c28 put
dup 41 /c29 put
dup 42 /c2a put
dup 43 /c2b put
dup 44 /c2c put
dup 45 /c2d put
dup 46 /c2e put
dup 47 /c2f put
dup 48 /c30 put
dup 49 /c31 put
dup 50 /c32 put
dup 51 /c33 put
dup 52 /c34 put
dup 53 /c35 put
dup 54 /c36 put
dup 55 /c37 put
dup 56 /c38 put
dup 57 /c39 put
dup 58 /c3a put
dup 59 /c3b put
dup 60 /c3c put
dup 61 /c3d put
dup 62 /c3e put
dup 63 /c3f put
dup 64 /c40 put
dup 65 /c41 put
dup 66 /c42 put
dup 67 /c43 put
dup 68 /c44 put
dup 69 /c45 put
readonly def
/CharStrings 257 dict dup begin
/.notdef 0 def
/c00 0 def
/c01 1 def
/c02 2 def
/c03 3 def
/c04 4 def
/c05 5 def
/c06 6 def
/c07 7 def
/c08 8 def
/c09 9 def
/c0a 10 def
/c0b 11 def
/c0c 12 def
/c0d 13 def
/c0e 14 def
/c0f 15 def
/c10 16 def
/c11 17 def
/c12 18 def
/c13 19 def
/c14 20 def
/c15 21 def
/c16 22 def
/c17 23 def
/c18 24 def
/c19 25 def
/c1a 26 def
/c1b 27 def
/c1c 28 def
/c1d 29 def
/c1e 30 def
/c1f 31 def
/c20 32 def
/c21 33 def
/c22 34 def
/c23 35 def
/c24 36 def
/c25 37 def
/c26 38 def
/c27 39 def
/c28 40 def
/c29 41 def
/c2a 42 def
/c2b 43 def
/c2c 44 def
/c2d 45 def
/c2e 46 def
/c2f 47 def
/c30 48 def
/c31 49 def
/c32 50 def
/c33 51 def
/c34 52 def
/c35 53 def
/c36 54 def
/c37 55 def
/c38 56 def
/c39 57 def
/c3a 58 def
/c3b 59 def
/c3c 60 def
/c3d 61 def
/c3e 62 def
/c3f 63 def
/c40 64 def
/c41 65 def
/c42 66 def
/c43 67 def
/c44 68 def
/c45 69 def
end readonly def
FontName currentdict end definefont pop
16 dict begin
/FontName /NNOWVO+greciliae def
/FontType 0 def
/FontMatrix [1 0 0 1 0 0] def
/FMapType 2 def
/Encoding [
0
] def
/FDepVector [
/NNOWVO+greciliae_00 findfont
] def
FontName currentdict end definefont pop
%%EndResource
/F7_0 /NNOWVO+greciliae 0 pdfMakeFont16
%%EndSetup
pdfStartPage
[] 0 d
1 i
0 j
0 J
10 M
1 w
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
false op
false OP
q
q
[1 0 0 1 -35 -707] cm
q
[1 0 0 1 0 0] cm
0 0 252 792 re
W
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
q
[1 0 0 1 36 732.167] cm
[] 0 d
0 J
0.504 w
0 0 m
180 0 l
S
Q
q
[1 0 0 1 36 724.027] cm
[] 0 d
0 J
0.504 w
0 0 m
180 0 l
S
Q
q
[1 0 0 1 36 715.886] cm
[] 0 d
0 J
0.504 w
0 0 m
180 0 l
S
Q
q
[1 0 0 1 36 707.746] cm
[] 0 d
0 J
0.504 w
0 0 m
180 0 l
S
Q
[1 0 0 1 0 0] Tm
0 0 Td
[1 0 0 1 36 726.288] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\003) 1 4.28994 Tj16
/DeviceRGB {} cs
[1 1 1] sc
/DeviceRGB {} CS
[1 1 1] SC
[1 0 0 1 52.924 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000E) 1 4.28994 Tj16
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
[1 0 0 1 52.924 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000B) 1 4.28994 Tj16
[1 0 0 1 69.849 718.147] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 80.901 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 91.953 726.288] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 94.021 739.597] Tm
0 0 Td
/F7_0 25.843 Tf
(\000#) 1 0.155058 Tj16
/DeviceRGB {} cs
[1 1 1] sc
/DeviceRGB {} CS
[1 1 1] SC
[1 0 0 1 103.005 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000E) 1 4.28994 Tj16
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
[1 0 0 1 103.005 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000B) 1 4.28994 Tj16
q
[1 0 0 1 117.404 707.494] cm
[] 0 d
0 J
0.491 w
0 0 m
0 24.926 l
S
Q
/DeviceRGB {} cs
[1 1 1] sc
/DeviceRGB {} CS
[1 1 1] SC
[1 0 0 1 0 0] Tm
0 0 Td
[1 0 0 1 133.385 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000E) 1 4.28994 Tj16
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
[1 0 0 1 133.385 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000B) 1 4.28994 Tj16
[1 0 0 1 150.31 718.147] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 161.362 722.218] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 172.414 726.288] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 183.466 718.147] Tm
0 0 Td
/F7_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
[1 0 0 1 185.534 739.597] Tm
0 0 Td
/F7_0 25.843 Tf
(\000#) 1 0.155058 Tj16
/DeviceRGB {} cs
[1 1 1] sc
/DeviceRGB {} CS
[1 1 1] SC
[1 0 0 1 194.519 710.007] Tm
0 0 Td
/F7_0 25.843 Tf
(\000E) 1 4.28994 Tj16
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
[1 0 0 1 194.519 710.007] Tm
0 0 Td
/F7_0 25.843 Tf
(\000B) 1 4.28994 Tj16
q
[1 0 0 1 212.162 707.494] cm
[] 0 d
0 J
0.491 w
0 0 m
0 24.926 l
S
Q
q
[1 0 0 1 215.754 707.494] cm
[] 0 d
0 J
0.491 w
0 0 m
0 24.926 l
S
Q
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
Q
Q
Q
showpage
%%PageTrailer
FGasper commented 8 years ago

image

Here is what it looks like when converted.

FGasper commented 8 years ago

image

Here is what it should look like.

mgieseki commented 8 years ago

dvisvgm has only limited support for fonts embedded in EPS files. That might be the reason why the notation objects are missing. In order to simplify the debugging, please provide a reduced example with all redundant parts removed. It's sufficient if the file contains only a single missing character.

FGasper commented 8 years ago

I think this is as simple as I can get it:

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: xpdf/pdftops 3.00
%%LanguageLevel: 2
%%BoundingBox: 0 0 138 50
%%DocumentSuppliedResources: (atend)
%%EndComments
%%BeginProlog
%%BeginResource: procset xpdf 3.00 0
/xpdf 75 dict def xpdf begin
% PDF special state
/pdfDictSize 15 def
/pdfSetup {
  3 1 roll 2 array astore
  /setpagedevice where {
    pop 3 dict begin
      /PageSize exch def
      /ImagingBBox null def
      /Policies 1 dict dup begin /PageSize 3 def end def
      { /Duplex true def } if
    currentdict end setpagedevice
  } {
    pop pop
  } ifelse
} def
/pdfStartPage {
  pdfDictSize dict begin
  /pdfFillCS [] def
  /pdfFillXform {} def
  /pdfStrokeCS [] def
  /pdfStrokeXform {} def
  /pdfFill [0] def
  /pdfStroke [0] def
  /pdfFillOP false def
  /pdfStrokeOP false def
  /pdfLastFill false def
  /pdfLastStroke false def
  /pdfTextMat [1 0 0 1 0 0] def
  /pdfFontSize 0 def
  /pdfCharSpacing 0 def
  /pdfTextRender 0 def
  /pdfTextRise 0 def
  /pdfWordSpacing 0 def
  /pdfHorizScaling 1 def
  /pdfTextClipPath [] def
} def
/pdfEndPage { end } def
% PDF color state
/cs { /pdfFillXform exch def dup /pdfFillCS exch def
      setcolorspace } def
/CS { /pdfStrokeXform exch def dup /pdfStrokeCS exch def
      setcolorspace } def
/sc { pdfLastFill not { pdfFillCS setcolorspace } if
      dup /pdfFill exch def aload pop pdfFillXform setcolor
     /pdfLastFill true def /pdfLastStroke false def } def
/SC { pdfLastStroke not { pdfStrokeCS setcolorspace } if
      dup /pdfStroke exch def aload pop pdfStrokeXform setcolor
     /pdfLastStroke true def /pdfLastFill false def } def
/op { /pdfFillOP exch def
      pdfLastFill { pdfFillOP setoverprint } if } def
/OP { /pdfStrokeOP exch def
      pdfLastStroke { pdfStrokeOP setoverprint } if } def
/fCol {
  pdfLastFill not {
    pdfFillCS setcolorspace
    pdfFill aload pop pdfFillXform setcolor
    pdfFillOP setoverprint
    /pdfLastFill true def /pdfLastStroke false def
  } if
} def
/sCol {
  pdfLastStroke not {
    pdfStrokeCS setcolorspace
    pdfStroke aload pop pdfStrokeXform setcolor
    pdfStrokeOP setoverprint
    /pdfLastStroke true def /pdfLastFill false def
  } if
} def
% build a font
/pdfMakeFont {
  4 3 roll findfont
  4 2 roll matrix scale makefont
  dup length dict begin
    { 1 index /FID ne { def } { pop pop } ifelse } forall
    /Encoding exch def
    currentdict
  end
  definefont pop
} def
/pdfMakeFont16 {
  exch findfont
  dup length dict begin
    { 1 index /FID ne { def } { pop pop } ifelse } forall
    /WMode exch def
    currentdict
  end
  definefont pop
} def
% graphics state operators
/q { gsave pdfDictSize dict begin } def
/Q {
  end grestore
  /pdfLastFill where {
    pop
    pdfLastFill {
      pdfFillOP setoverprint
    } {
      pdfStrokeOP setoverprint
    } ifelse
  } if
} def
/cm { concat } def
/d { setdash } def
/i { setflat } def
/j { setlinejoin } def
/J { setlinecap } def
/M { setmiterlimit } def
/w { setlinewidth } def
% path segment operators
/m { moveto } def
/l { lineto } def
/c { curveto } def
/re { 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
      neg 0 rlineto closepath } def
/h { closepath } def
% path painting operators
/S { sCol stroke } def
/Sf { fCol stroke } def
/f { fCol fill } def
/f* { fCol eofill } def
% clipping operators
/W { clip newpath } def
/W* { eoclip newpath } def
% text state operators
/Tc { /pdfCharSpacing exch def } def
/Tf { dup /pdfFontSize exch def
      dup pdfHorizScaling mul exch matrix scale
      pdfTextMat matrix concatmatrix dup 4 0 put dup 5 0 put
      exch findfont exch makefont setfont } def
/Tr { /pdfTextRender exch def } def
/Ts { /pdfTextRise exch def } def
/Tw { /pdfWordSpacing exch def } def
/Tz { /pdfHorizScaling exch def } def
% text positioning operators
/Td { pdfTextMat transform moveto } def
/Tm { /pdfTextMat exch def } def
% text string operators
/cshow where {
  pop
  /cshow2 {
    dup {
      pop pop
      1 string dup 0 3 index put 3 index exec
    } exch cshow
    pop pop
  } def
}{
  /cshow2 {
    currentfont /FontType get 0 eq {
      0 2 2 index length 1 sub {
        2 copy get exch 1 add 2 index exch get
        2 copy exch 256 mul add
        2 string dup 0 6 5 roll put dup 1 5 4 roll put
        3 index exec
      } for
    } {
      dup {
        1 string dup 0 3 index put 3 index exec
      } forall
    } ifelse
    pop pop
  } def
} ifelse
/awcp {
  exch {
    false charpath
    5 index 5 index rmoveto
    6 index eq { 7 index 7 index rmoveto } if
  } exch cshow2
  6 {pop} repeat
} def
/Tj {
  fCol
  1 index stringwidth pdfTextMat idtransform pop
  sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse
  pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj16 {
  fCol
  2 index stringwidth pdfTextMat idtransform pop
  sub exch div
  pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing pdfHorizScaling mul add 0
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj16V {
  fCol
  2 index stringwidth pdfTextMat idtransform exch pop
  sub exch div
  0 pdfWordSpacing pdfTextMat dtransform 32
  4 3 roll pdfCharSpacing add 0 exch
  pdfTextMat dtransform
  6 5 roll Tj1
} def
/Tj1 {
  0 pdfTextRise pdfTextMat dtransform rmoveto
  currentpoint 8 2 roll
  pdfTextRender 1 and 0 eq {
    6 copy awidthshow
  } if
  pdfTextRender 3 and dup 1 eq exch 2 eq or {
    7 index 7 index moveto
    6 copy
    currentfont /FontType get 3 eq { fCol } { sCol } ifelse
    false awcp currentpoint stroke moveto
  } if
  pdfTextRender 4 and 0 ne {
    8 6 roll moveto
    false awcp
    /pdfTextClipPath [ pdfTextClipPath aload pop
      {/moveto cvx}
      {/lineto cvx}
      {/curveto cvx}
      {/closepath cvx}
    pathforall ] def
    currentpoint newpath moveto
  } {
    8 {pop} repeat
  } ifelse
  0 pdfTextRise neg pdfTextMat dtransform rmoveto
} def
/TJm { pdfFontSize 0.001 mul mul neg 0
       pdfTextMat dtransform rmoveto } def
/TJmV { pdfFontSize 0.001 mul mul neg 0 exch
        pdfTextMat dtransform rmoveto } def
/Tclip { pdfTextClipPath cvx exec clip newpath
         /pdfTextClipPath [] def } def
% Level 2 image operators
/pdfImBuf 100 string def
/pdfIm {
  image
  { currentfile pdfImBuf readline
    not { pop exit } if
    (%-EOD-) eq { exit } if } loop
} def
/pdfImM {
  fCol imagemask
  { currentfile pdfImBuf readline
    not { pop exit } if
    (%-EOD-) eq { exit } if } loop
} def
/pdfImClip {
  gsave
  0 2 4 index length 1 sub {
    dup 4 index exch 2 copy
    get 5 index div put
    1 add 3 index exch 2 copy
    get 3 index div put
  } for
  pop pop rectclip
} def
/pdfImClipEnd { grestore } def
% shading operators
/colordelta {
  false 0 1 3 index length 1 sub {
    dup 4 index exch get 3 index 3 2 roll get sub abs 0.004 gt {
      pop true
    } if
  } for
  exch pop exch pop
} def
/funcCol { func n array astore } def
/funcSH {
  dup 0 eq {
    true
  } {
    dup 6 eq {
      false
    } {
      4 index 4 index funcCol dup
      6 index 4 index funcCol dup
      3 1 roll colordelta 3 1 roll
      5 index 5 index funcCol dup
      3 1 roll colordelta 3 1 roll
      6 index 8 index funcCol dup
      3 1 roll colordelta 3 1 roll
      colordelta or or or
    } ifelse
  } ifelse
  {
    1 add
    4 index 3 index add 0.5 mul exch 4 index 3 index add 0.5 mul exch
    6 index 6 index 4 index 4 index 4 index funcSH
    2 index 6 index 6 index 4 index 4 index funcSH
    6 index 2 index 4 index 6 index 4 index funcSH
    5 3 roll 3 2 roll funcSH pop pop
  } {
    pop 3 index 2 index add 0.5 mul 3 index  2 index add 0.5 mul
    funcCol sc
    dup 4 index exch mat transform m
    3 index 3 index mat transform l
    1 index 3 index mat transform l
    mat transform l pop pop h f*
  } ifelse
} def
/axialCol {
  dup 0 lt {
    pop t0
  } {
    dup 1 gt {
      pop t1
    } {
      dt mul t0 add
    } ifelse
  } ifelse
  func n array astore
} def
/axialSH {
  dup 0 eq {
    true
  } {
    dup 8 eq {
      false
    } {
      2 index axialCol 2 index axialCol colordelta
    } ifelse
  } ifelse
  {
    1 add 3 1 roll 2 copy add 0.5 mul
    dup 4 3 roll exch 4 index axialSH
    exch 3 2 roll axialSH
  } {
    pop 2 copy add 0.5 mul axialCol sc
    exch dup dx mul x0 add exch dy mul y0 add
    3 2 roll dup dx mul x0 add exch dy mul y0 add
    dx abs dy abs ge {
      2 copy yMin sub dy mul dx div add yMin m
      yMax sub dy mul dx div add yMax l
      2 copy yMax sub dy mul dx div add yMax l
      yMin sub dy mul dx div add yMin l
      h f*
    } {
      exch 2 copy xMin sub dx mul dy div add xMin exch m
      xMax sub dx mul dy div add xMax exch l
      exch 2 copy xMax sub dx mul dy div add xMax exch l
      xMin sub dx mul dy div add xMin exch l
      h f*
    } ifelse
  } ifelse
} def
/radialCol {
  dup t0 lt {
    pop t0
  } {
    dup t1 gt {
      pop t1
    } if
  } ifelse
  func n array astore
} def
/radialSH {
  dup 0 eq {
    true
  } {
    dup 8 eq {
      false
    } {
      2 index dt mul t0 add radialCol
      2 index dt mul t0 add radialCol colordelta
    } ifelse
  } ifelse
  {
    1 add 3 1 roll 2 copy add 0.5 mul
    dup 4 3 roll exch 4 index radialSH
    exch 3 2 roll radialSH
  } {
    pop 2 copy add 0.5 mul dt mul t0 add axialCol sc
    exch dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
    0 360 arc h
    dup dx mul x0 add exch dup dy mul y0 add exch dr mul r0 add
    0 360 arc h f*
  } ifelse
} def
end
%%EndResource
%%EndProlog
%%BeginSetup
xpdf begin
%%BeginResource: font WYIJBV+OFLGoudyStM
16 dict begin
/FontName /WYIJBV+OFLGoudyStM_00 def
/FontType 1 def
/FontMatrix [0.001 0 0 0.001 0 0] def
/FontBBox [-367 -438 1106 960] def
/PaintType 0 def
/Encoding 256 array
dup 0 /c00 put
dup 1 /c01 put
dup 2 /c02 put
dup 3 /c03 put
dup 4 /c04 put
dup 5 /c05 put
dup 6 /c06 put
dup 7 /c07 put
dup 8 /c08 put
dup 9 /c09 put
dup 10 /c0a put
dup 11 /c0b put
dup 12 /c0c put
dup 13 /c0d put
dup 14 /c0e put
dup 15 /c0f put
dup 16 /c10 put
dup 17 /c11 put
dup 18 /c12 put
dup 19 /c13 put
dup 20 /c14 put
dup 21 /c15 put
dup 22 /c16 put
dup 23 /c17 put
dup 24 /c18 put
dup 25 /c19 put
dup 26 /c1a put
dup 27 /c1b put
dup 28 /c1c put
dup 29 /c1d put
dup 30 /c1e put
dup 31 /c1f put
dup 32 /c20 put
dup 33 /c21 put
dup 34 /c22 put
35 1 255 { 1 index exch /.notdef put } for
readonly def
currentdict end
currentfile eexec
5AA4F71255501637F1A431BAB555283D093E1B588B45B0281559110D21315C62
BD638C6B34BA54AA75227715D9947EBCD51A104CAEA657499E94138F5645BF68
368BB1B1EC8E4776F067FFF2CE9B89FB7E63A7DB304498C1036D399C47A4CB79
BD517EDB02BEB90195FD7DDAF3E839BCE2DB156D9337DBB2305A465B3E0FFB97
1985C79DC71C47E26F9F0F042B2CDEE97B679358059256FB93D662D43C7ECB5B
1A564DFCECB963478373C69F52172F071E0AA6082A3E10D9E1CE2851CFA210EE
7BD5FCB1AAE15E89D1FB339D587D218B89C18A32F47C7451A80CB1FC07CF5EF7
A7D87ECC34E7E5F6B8FA9C4812F7ABEE6DC3551C90911291633D907814FD70A8
0487EBE37B8B37C1294261927C2539DE9BFE8984F5CC7E12DDDAAE938BF3A386
4746EB7862B83CE9079FDA8A9BBC106447FB68ABE1CC1F61B9C9D3463AE8CCE4
6344E3AA88D9086A53ECC046547FA19395A149C2006CB58CF4674895672D78F2
674A4D15265E9259242800DF90037E253D34EB4B74FA5C77A71A556120AC9B04
317274ED4887E41296435B1A341EA267D321313291912B68E441568BCFCE8C52
1BD2BD9A120079526CE4102D04B74EC9AA231434BCD9DD598BDF9353758A9060
A85CE1415EC6A6BEBD1F38B53E38DE63654DAC56F17A6CE741A5A6ACAA3AA909
1214513C15374318147FBB480153FCB0EAA77A7CCA9B26F93E8D607C9CA07EA1
194C06AFC437BE6FEE6E4A2E8913FA0F531F23F58B1D8D9C638B3B508E80CB52
31629A3C6DDF647B7C922741E040A63A6E3432C68FC464B1E438E3DA3FBF493C
85A0C0F8C99D3B334F7DBA100F16F7DF40CD4F1289F5EFDC86CED59AD2A0D5B5
89ED126E9FFF4F66EB5C280CA8436861AAD6C122039F368A1E58EC1C4ED13F0C
B6245998E0859462DED656C693E954EF59FAD2B29502C1CAEE2E2AB793662969
2AEE19F64AD5E7DC1463BF6EECBAD50178D403E2F3E4E118325CD1DE1C3C0639
9D7F7381AFEDBAE939F6080BAB99DB55175B7E7F483430E6191F7E5B0D237B46
BDB0DEE378480302E53F39AE52C93EEDB764187FCC78C0DF40E39EAE43C9EF7C
D83B3CD5D5B708FFF0CBDBC7CB8C06454C2C0EA214A696E0CF7DF0BBAB5D221E
3E3EAF1E8518D0ADD85192F36AD6FBEEBD024FC83AC31FCE2E9D9210870990FD
20685462321FADC2CA1FFC00CA24E877AA9C310D39A972263BDE908114FA3E76
7F008A5B78F44283189B65550A897C6C481A35C3E519E3B1927987776AA58F2E
DCB608415804890995AEBD046C158A355F61B27430AF88EA2154AF58F65DA567
0A39A183DD5EF54549B9424EA529FD7EF9A07309048504445A69D4EAFAAF00F1
3F5C6DD89FE1BE7BFBFF717FFFB85F573BD16172DFCFC79FFF4195795F2F4E8A
C1E6268A31D2A0FC9F401085A50D6CB0778454E8991D94DB2F7F4C70D7D0C4A8
1030F3FD7E4E72EE45FC9EB4AC86EE7658B418894A46911D709880352C147F82
87486278D7BA7F67186876E47713F967C906F07AA2588900316B7BA8C5444582
BDB41B5C5B4157827B854930F489BE1C2388A308E0D2BA611DC000744FF258DD
6786D2533A370F99E3C77D77FFBF8C8DBF1D8EB978ED58C0B5218255A762306D
EED5DBF7EF14732DD13B328649F167130CC50F76CCFFABC4EAE77364EA8B1C0C
73E885852EB500E663F70D9654DE41A46D39E348F70AB28CAAAFD59F49029302
4FB20100BF4CB5688EBA8703C5D16D0CB91E2E9F
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
cleartomark
16 dict begin
/FontName /WYIJBV+OFLGoudyStM def
/FontType 0 def
/FontMatrix [1 0 0 1 0 0] def
/FMapType 2 def
/Encoding [
0
] def
/FDepVector [
/WYIJBV+OFLGoudyStM_00 findfont
] def
FontName currentdict end definefont pop
%%EndResource
/F7_0 /WYIJBV+OFLGoudyStM 0 pdfMakeFont16
%%BeginResource: font ARWRGM+greciliae
/ARWRGM+greciliae_sfnts [
<00010000000B0080000300306376742000210279000000BC000000046670676D
00000000000000C000000000676C7966B2AC3CA2000000C0000000C868656164
03DE960F0000018800000036686865610B83FE3C000001C000000024686D7478
02120021000001E4000000266C6F6361026802A40000020C000000246D617870
0057008100000230000000207072657000000000000002500000000076686561
000203E90000025000000024766D747803E80000000002740000004400>
<0021027900>
<000200210000012A029A00030007002EB101002F3CB2070400ED32B10605DC3C
B2030200ED3200B103002F3CB2050400ED32B2070601FC3CB2010200ED323311
211127331123210109E8C7C7029AFD662102580000>
<0001FFFFFFD800A701EF00190000172E0135113436331E011D01272623220614
1633323F011514066C323A3A321C1E0A1D2D1E2A2A1E2E1C0A22280137320146
3235011B15B0091A2C402C180AB1181A00>
<00010000FFDC00A600A90008000037321D01262207353452541B701BA92F9E1C
1C9E2F0000>
<00010000000100007A2439E65F0F3CF5028B03E800000000CEE8AA5500000000
CEE8AA55FF81F9C904EF06B700000008000000000000000000>
<0001000006B7F9C9005A04EFFF81FF8104EF0001000000000000000000000000
0000000200>
<016C002100A60000000000000000000000000000000000000000000000000000
000000000000000000>
<0000002A002A002A005200520052005200520052005200520052005200520052
0052006400>
<0001000000110050000400000000000200000001000100000040002E0000000000>
<0001000000000000000003E80000000000000000000100000000000000000000
0000000100>
<03E8000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
0000000000>
] def
10 dict begin
/FontName /ARWRGM+greciliae_00 def
/FontType 42 def
/FontMatrix [1 0 0 1 0 0] def
/FontBBox [-127 -1591 1263 1719] def
/PaintType 0 def
/sfnts ARWRGM+greciliae_sfnts def
/Encoding 256 array
dup 0 /c00 put
dup 1 /c01 put
dup 2 /c02 put
dup 3 /c03 put
dup 4 /c04 put
dup 5 /c05 put
dup 6 /c06 put
dup 7 /c07 put
dup 8 /c08 put
dup 9 /c09 put
dup 10 /c0a put
dup 11 /c0b put
dup 12 /c0c put
dup 13 /c0d put
dup 14 /c0e put
dup 15 /c0f put
dup 16 /c10 put
readonly def
/CharStrings 257 dict dup begin
/.notdef 0 def
/c00 0 def
/c01 1 def
/c02 2 def
/c03 3 def
/c04 4 def
/c05 5 def
/c06 6 def
/c07 7 def
/c08 8 def
/c09 9 def
/c0a 10 def
/c0b 11 def
/c0c 12 def
/c0d 13 def
/c0e 14 def
/c0f 15 def
/c10 16 def
end readonly def
FontName currentdict end definefont pop
16 dict begin
/FontName /ARWRGM+greciliae def
/FontType 0 def
/FontMatrix [1 0 0 1 0 0] def
/FMapType 2 def
/Encoding [
0
] def
/FDepVector [
/ARWRGM+greciliae_00 findfont
] def
FontName currentdict end definefont pop
%%EndResource
/F8_0 /ARWRGM+greciliae 0 pdfMakeFont16
%%EndSetup
pdfStartPage
[] 0 d
1 i
0 j
0 J
10 M
1 w
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
false op
false OP
q
q
[1 0 0 1 -42 -45] cm
q
[1 0 0 1 0 0] cm
0 0 216 144 re
W
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
[1 0 0 1 0 0] Tm
0 0 Td
[1 0 0 1 41.978 45.28] Tm
0 0 Td
/F7_0 35.8655 Tf
(\000") 1 29.1228 Tj16
q
[1 0 0 1 77.078 87.139] cm
[] 0 d
0 J
0.504 w
0 0 m
102.922 0 l
S
Q
q
[1 0 0 1 77.078 78.999] cm
[] 0 d
0 J
0.504 w
0 0 m
102.922 0 l
S
Q
q
[1 0 0 1 77.078 70.858] cm
[] 0 d
0 J
0.504 w
0 0 m
102.922 0 l
S
Q
q
[1 0 0 1 77.078 62.718] cm
[] 0 d
0 J
0.504 w
0 0 m
102.922 0 l
S
Q
[1 0 0 1 0 0] Tm
0 0 Td
[1 0 0 1 77.078 81.26] Tm
0 0 Td
/F8_0 25.843 Tf
(\000\003) 1 4.28994 Tj16
[1 0 0 1 89.121 73.119] Tm
0 0 Td
/F8_0 25.843 Tf
(\000\020) 1 4.28994 Tj16
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
/DeviceGray {} cs
[0] sc
/DeviceGray {} CS
[0] SC
Q
Q
Q
showpage
%%PageTrailer
pdfEndPage
%%Trailer
end
%%DocumentSuppliedResources:
%%+ font WYIJBV+OFLGoudyStM
%%+ font ARWRGM+greciliae
%%EOF

These are coming from the Gregorian chant tool at http://dev.illuminarepublications.com/gregorio/

I did find another way to do the conversion that i need (epstopdf, then pdf2svg) but am happy to help here if I can.

mgieseki commented 8 years ago

Thanks for the additional info. The reason for the missing characters is a lacking implementation of PostScript operator awidthshow. I'll add it to one of the next releases.