/// <summary>
        /// Adds a PdfScriptObject to the page that draws a rectangle given left-upper coordinates and width and height.
        /// </summary>
        public static PdfObjectRef DrawRectangle(this PdfPageWriter page, double x, double y, double width, double height, PdfGraphicsOptions options, double leftRotationDegrees = 0.0)
        {
            var obj = new PdfScriptObject();

            obj.BeginGraphicsState();
            options.Apply(obj);
            obj.DrawRectangle(x, y, width, height, leftRotationDegrees);
            obj.EndPath(true, true, true);
            obj.EndGraphicsState();
            return(page.WriteObject(obj));
        }