Euro(€) sign badly converted into curves

  • If the Euro(€) sign is printed out solitary it gets converted into curves which seem to be broken. If the created PDF is opened with Foxit Reader there are strange curves starting around the position of the Euro(€) sign. Acrobat Reader 5.0.5 will show "There was an error processing page. Too few operands in path." and the shown page will get damaged while scrolling around. Other Adobe Reader versions (including some 8.x) will show a processing page error, too.

    With the following code, the problem is reproduceable:

    Code
    program TestPDF;{$APPTYPE CONSOLE}uses  sysutils, WPPDFR1, WPPDFR2;var PDFPrinter : TWPPDFPrinter;    x,y : Integer;    line : string;    canvasres : Integer;begin  PDFPrinter := TWPPDFPrinter.Create(nil);  try    PDFPrinter.Filename := 'test.pdf';    try      PDFPrinter.BeginDoc;      PDFPrinter.StartPage(Round(8.5*72),Round(11*72),72,72,0);      canvasres := PDFPrinter.Canvas.Font.PixelsPerInch;      PDFPrinter.Canvas.Font.Name := 'Arial';      PDFPrinter.Canvas.Font.Size := 10;      x := Round(0.5*canvasres);      y := Round(0.5*canvasres);      PDFPrinter.Canvas.TextOut(x,y,'Dies ist ein Test mit €-Zeichen.');      y:=y+PDFPrinter.Canvas.TextHeight('Aq');      PDFPrinter.Canvas.TextOut(x,y,'€');      PDFPrinter.EndPage;    finally      PDFPrinter.EndDoc;    end;  finally    PDFPrinter.Free;  end;end.


    The Euro(€) sign wihtin the text gets out as text but the solitary sign gets out as curves:

    Code
    /F1 10 Tf 0 Ts  0 g 36 -45 Td(Dies ist ein Test mit €-Zeichen.)TjET q 0.01 0 0 0.01 36 -48 cm  0 g -13 -1022 l 0 -905 l h 386 -163 m 331 -163 286 -176 248 -203 c 226 -218 206 -240 188 -269 c 170 -298 160 -326 156 -353 c 489 -353 l 476 -419 l 148 -419 l 148 -426 148 -432 148 -438 c 148 -463 148 -478 148 -483 c 463 -483 l 449 -549 l 159 -549 l 172 -624 205 -676 257 -707 c 295 -730 335 -741 379 -741 c 439 -741 487 -725 521 -693 c 521 -794 l 480 -813 435 -822 386 -822 c 239 -822 140 -761 88 -639 c 78 -614 69 -584 61 -549 c -13 -549 l 1 -483 l 51 -483 l 51 -470 50 -455 50 -439 c 50 -433 50 -426 50 -419 c -13 -419 l 1 -353 l 57 -353 l 77 -247 130 -171 215 -125 c 267 -96 325 -82 388 -82 c 448 -82 499 -95 541 -121 c 521 -212 l 481 -179 436 -163 386 -163 c 386 -163 l 386 -163 l h f


    If the solitary Euro(€) sign is followed by a blank, it gets out as text again (and everything is well):

    Code
    /F1 10 Tf 0 Ts  0 g 36 -45 Td(Dies ist ein Test mit €-Zeichen.)Tj
    0 -12 Td(€ )Tj


    The option wpDisableAutoGlyphs doesn't make a difference. With the option wpTextAsGlyphs the created PDF gets completly unusable with the viewers mentioned above.

    ------
    Greetings, B. Henke

  • Hello Julian,

    thanks for fixing the generated curves, but why do some signs get converted to curves at all?

    They are not converted if they are printed together with other text (or even followed by a blank) but converted if they are printed out solitary.

    The converted ones don't look smooth:
    [Blockierte Grafik: http://img4.imageshack.us/img4/7416/wpdf.png] (Screenshot made using WPviewPDF Demo)

    ------
    Greetings, B. Henke