ByteScout PDF SDK - VBScript and VB6 - Set Text Rotation - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF SDK – VBScript and VB6 – Set Text Rotation

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Set Text Rotation

How to set text rotation in VBScript and VB6 with ByteScout PDF SDK

The tutorial shows how to set text rotation in VBScript and VB6

The sample shows steps and algorithm of how to set text rotation and how to make it work in your VBScript and VB6 application. 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 set text rotation in VBScript and VB6.

The SDK samples like this one below explain how to quickly make your application do set text rotation in VBScript and VB6 with the help of ByteScout PDF SDK. Just copy and paste the code into your VBScript and VB6 application’s code and follow the instruction. Code testing will allow the function to be tested and work properly with your data.

Trial version of ByteScout PDF SDK is available for free. Source code samples are included to help you with your VBScript and VB6 app.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

TextRotation.vbs
      
' This example demonstrates how to draw a text. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) ' Prepare font and brush Set font = comHelpers.CreateSystemFont("Arial", 24) Set blackBrush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) Set canvas = page1.Canvas ' 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 pdfDocument.Save("result.pdf") ' Save document to file pdfDocument.Save("result.pdf") ' Open PDF document in default associated application (for demo puprpose) Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next