Public enum to define the subscript or superscript mode.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Gets the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Create a new PDF standard font
let font: PdfStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 10);
// Create a new PDF string format
let format: PdfStringFormat = new PdfStringFormat(PdfTextAlignment.right);
// Set a new paragraph indent
format.paragraphIndent = 20;
// Set the subscript or superscript mode
format.subSuperScript = PdfSubSuperScript.subScript;
// Draw the text
page.graphics.drawString('Helvetica', font, [0, 180, page.size[0], 40], undefined, new PdfBrush([0, 0, 255]), format);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
none
- Specifies the type of none
.subScript
- Specifies the type of subScript
.superScript
- Specifies the type of superScript
.