Articles in this section
Category / Section

How to draw a rotated Barcode onto a PDF?

1 min read

You can rotate the Barcode in the PDF document by rotating the PdfGraphics to the desired angle and drawing the Barcode in it. Refer to the following code example.

C#

//Save the current Graphics State
PdfGraphicsState gs = page.Graphics.Save();
//Rotate the Graphics to 90 degree
page.Graphics.RotateTransform(-90);
//Draw the Barcode
barCode.Draw(page, new PointF(-200, 100));
//Restore the Previous Graphics State
page.Graphics.Restore(gs);

VB

'Save the current Graphics State
Dim gs As PdfGraphicsState = page.Graphics.Save()
'Rotate the Graphics to 90 degree
page.Graphics.RotateTransform(-90)
'Draw the Barcode
barCode.Draw(page, New PointF(-200, 100))
'Restore the Previous Graphics State
page.Graphics.Restore(gs)

Refer to the sample for rotating the Barcode in the following link.

http://www.syncfusion.com/downloads/support/directtrac/general/Sample-906666355.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied