Articles in this section
Category / Section

How to draw a rotated Barcode onto a PDF?

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

C#

// Save the current Graphics State
PdfGraphicsState gs = page.Graphics.Save();
// Rotate the Graphics to 90 degrees
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 degrees
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)
Access denied
Access denied