The documentation is designed to help you to implement the features on your side. ByteScout PDF SDK is the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings. It can rotate text in PDF in VB.NET.
You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF SDK for rotate text in PDF below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
You can download free trial version of ByteScout PDF SDK from our website to see and try many others source code samples for VB.NET.
Imports Bytescout.PDF Module Module1 Sub Main() ' Create PDF document Dim document = New Document() document.RegistrationName = "demo" document.RegistrationKey = "demo" ' Create page Dim page = New Page(PaperFormat.A4) ' Add page to document document.Pages.Add(page) Dim canvas = page.Canvas ' Prepare font and brush Dim font = New Bytescout.PDF.Font(StandardFonts.Helvetica, 24) Dim blackBrush = New Bytescout.PDF.SolidBrush() ' Draw simple text canvas.DrawString("Simple text.", font, blackBrush, 50, 100) ' Save canvas state canvas.SaveGraphicsState() ' Move canvas origin (0,0) point to (50,100) canvas.TranslateTransform(50, 100) ' Rotate canvas at 45 deg around of the origin point canvas.RotateTransform(45) canvas.DrawString("Rotated 45", font, blackBrush, 0, 0) ' Rotate another 45 deg canvas.RotateTransform(45) canvas.DrawString("Rotated 90", font, blackBrush, 0, 0) ' Restore canvas state to reset all transformations canvas.RestoreGraphicsState() ' Save document document.Save("result.pdf") ' Open PDF document in default associated application (for demo puprpose) Process.Start("result.pdf") End Sub End Module