/// <summary>
        /// Adds a PdfScriptObject to the page that draws a rectangle given 2 coordinates.
        /// </summary>
        public static PdfObjectRef DrawRectangle2(this PdfPageWriter page, double x1, double y1, double x2, double y2, PdfGraphicsOptions options, double leftRotationDegrees = 0.0)
        {
            var obj = new PdfScriptObject();

            obj.BeginGraphicsState();
            options.Apply(obj);
            obj.DrawRectangle2(x1, y1, x2, y2, leftRotationDegrees);
            obj.EndPath(true, true, true);
            obj.EndGraphicsState();
            return(page.WriteObject(obj));
        }