Beiträge von gtsbcrooker

    We are using v4 of WPDF along with THtmlViewer for rendering PDF's that contain HTML. The method of rendering the HTML to the PDF is basically this:

    MetaFile := html.MakeMetaFile(0, html.Width, html.Width, html.Height);

    try

    Canvas.StretchDraw(Html.BoundsRect, MetaFile);

    finally

    MetaFile.Free;

    end;

    The problem we are seeing is that the rendering of the font is incorrect in two ways:

    1. The hyperlinks "appear" as hyperlinks (blue with underlines) but don't seem to be treated by the PDF reader as hyperlinks. If the displayed text of the <a> tag is also the link (e.g. href attribute value is the same as the content of the anchor element), then Adobe seems to be treated that text as a hyperlink on its own

    2. If the text contains a "w" then a space is appearing after the "w". This is causing an issue with #1 above if the URL contains a "w" - the link gets broken at the "w" and doesn't work properly.

    This is using Arial, 8pt. If I change to a different font such as Times New Roman, the problem goes away.

    Any suggestions?

    Thanks