ByteScout PDF SDK - VB.NET - Rotate Text in PDF - ByteScout

ByteScout PDF SDK – VB.NET – Rotate Text in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Rotate Text in PDF

How to rotate text in PDF in VB.NET with ByteScout PDF SDK

This code in VB.NET shows how to rotate text in PDF with this how to tutorial

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.

Try ByteScout PDF SDK today: Get 60 Day Free Trial or sign up for Web API

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

Try ByteScout PDF SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)



Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation


Sign Up for free Web API key

Explore Web API Documentation