A quick check with your code in the paint event of a panel gives we the 180 working fine - but I can't use your DrawRectangle.GetNormalizedRectangle method because I don't have it, so I used TranslateTransform instead:
g.TranslateTransform(myDrawingPanel.Width, myDrawingPanel.Height);
g.RotateTransform(180);
g.DrawRectangle(Pens.Red, objRect);
g.DrawString(lines[i], textFont, brush, objRec, sf);
g.RotateTransform(-180);
That worked fine - the text was upside down and right to left, as I would expect.
I would suggest that you want to look at your method - it may be that it is causing the problem. It could also be worth looking at your StringFormat settings - again I don't have those.
"The graphics used in this method is the Graphics object of a PrintPageEventArgs; it seems that this method doesn't work for 180° just if I select a pdf virtual printer. In all other cases it works fine and produce the result expected. Only for pdf printers and orientation 180° degrees, the instruction g.RotateTransform(-180) seems to be ignored at all! I know that it seems weird, but I can't find a solution!"
I just tried it with mine:
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
pd.Print();
}
void pd_PrintPage(object sender, PrintPageEventArgs e)
{
Graphics g = e.Graphics;
RectangleF objRec = new RectangleF(50, 50, 100, 75);
g.TranslateTransform(myDrawingPanel.Width, myDrawingPanel.Height);
g.RotateTransform(180);
g.DrawRectangle(Pens.Red, new Rectangle(50, 50, 100, 75));
g.DrawString("Hello", font, Brushes.Blue, new RectangleF(50, 50, 100, 75), new StringFormat());
g.RotateTransform(-180);
}
Using CutePDF as the printer driver and it worked fine - I get the text in blue, upside down, inside a red box.
Which PDF system are you using?