GetLinesToDrop
Returns the number of lines that the drop cap occupies.
Syntax
expression.GetLinesToDrop();
expression - A variable that represents an ApiDropCap class.
Parameters
This method doesn't have any parameters.
Returns
number
Example
Read the number of lines a drop cap spans in a document.
// Find out how many lines the drop cap of a paragraph drops down in a document.
// Retrieve the line count that the drop cap of a paragraph occupies in a document.
const doc = Api.GetDocument();
const paragraph = Api.CreateParagraph();
paragraph.AddText('Once upon a time, there was a paragraph that started with a large decorative letter.');
doc.Push(paragraph);
const dropCap = paragraph.SetDropCap('drop');
dropCap.SetLinesToDrop(3);
const lines = dropCap.GetLinesToDrop();
const result = Api.CreateParagraph();
result.AddText('The drop cap spans ' + lines + ' lines');
doc.Push(result);