generating borders from THTMLViewer component using wPDF3

  • I have the THTMLViewer component on my page with the following contents:

    <html>
    <head>
    <style>
    div.ex{width:400px; height:60px; padding:0px; border-width:20px; border-style:solid; margin:0px; color: #0000FF; background-color: #FF0000}
    </style>
    </head>
    <body><div class="ex">
    </html>

    In Delphi XE the following code is creating the PDF element:

    MetaFile := Html.MakeMetaFile(0, Html.Width, Html.Width, Html.Height);
    wPDF.Canvas.StretchDraw(Html.BoundsRect, MetaFile);

    where

    Html: THTMLViewer;
    MetaFile: TMetaFile;
    wPdf: TWPPDFPrinter;

    This process generates the red interior of the rectangle but NOT its blue borders.

    When I substitute the TBitmap for TWPPDFPrinter in the above process then both the red interior and the blue borders are generated on the bitmap. This indicates that the MetaFile generated from the THTMLViewer component contains the borders information.

    Could you please comment on why the TWPPDFPrinter does not generate the borders in the scenario described?