--- title: Line - Scoped, Global description: Creates a Line object using methods to draw a line in a PDF.Instantiates a new Line object.Places a line on a document page.Sets the color of a line. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/server-api-reference/LineBothAPI.html release: australia product: Server API Reference classification: server-api-reference topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 2 breadcrumb: [Server API reference, API reference, API implementation and reference] --- # Line - Scoped, Global Creates a Line object using methods to draw a line in a PDF. This API is part of the ServiceNow PDF Generation Utilities plugin \(com.snc.apppdfgenerator\) and is provided within the `sn_pdfgeneratorutils` namespace. The plugin is activated by default. This API is a component used with the [Document API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DocumentBothAPI.md) to generate a PDF. **Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md) ## Line - Line\(\) Instantiates a new Line object. |Name|Type|Description| |----|----|-----------| |None| | | The following examples shows how to create a Line object. ``` var line = new sn_pdfgeneratorutils.Line(); ``` ## Line – drawLine\(Document document, Number pageNo, Number xPos, Number yPos, Number width, Number lineWidth\) Places a line on a document page.
| Name | Type | Description |
|---|---|---|
| Document | [Document](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/DocumentBothAPI.md) | Name of the document object. |
| pageNo | Number | Page number on which you want to place the line. |
| xPos | Number | X-coordinate area of the page on which to place the line. |
| yPos | Number | Y-coordinate area of the page on which to place the line. |
| width | Number | Width area of the page in which you want to draw the line. Values are in points. |
| lineWidth | Number | Optional. Value of line thickness in points.Default: 1 |