Home Devices

90º Angle Label not correctly exported to PDF

edited October 2010 in Devices
Hello,

I'm using Delphi XE and Report Builder 12.02.

I have the following code on the ReportEndPage Event:

RotatedLabel := TppDrawText.Create (ppReport.Engine.Page);
RotatedLabel.Font.Name := 'Arial';
RotatedLabel.Font.Size := 4;
RotatedLabel.AutoSize := True;
RotatedLabel.Left := 200050;
RotatedLabel.Top := 231000;
RotatedLabel.Width := 260000;
RotatedLabel.Text := 'Codeware, SA - Número Único de Matrícula e
Pessoa Colectiva nº 000000000 - Capital Social - € 99.999.999,99';
RotatedLabel.Angle := 90;
RotatedLabel.Page := ppReport.Engine.Page;

This shows the label correctly in preview but when I change the report
output to PDF the label isn't in the right place.
If I comment the Angle property I can see that the label seems to be
positioned correctly, but when the Angle property is defined to 90 the label
doesn't show up in the correct place.

Anything I can change for the label to correctly exported to PDF?
Should I use another event to manually add this label to my report?

Thank you in advance,

Pedro Bento

Comments

  • edited October 2010
    Hi Pedro,

    Try removing the line that assigns the width of the drawcommand. This is
    unnecessary when using AutoSize and seems to confuse the PDF engine.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2010
    Hi Nico,

    I removed the Width assignment and everything seems to work fine.
    In my case I also had to set the Transparent property to True because the
    text, when exported to PDF, stretched all the way to the bottom of the page.

    Tkx for your help.


This discussion has been closed.