Document Service

سند

این سرویس به اسکریپت‌ها اجازه می‌دهد تا فایل‌های Google Docs را ایجاد، به آنها دسترسی پیدا کرده و آنها را تغییر دهند.

// Open a document by ID.
var doc = DocumentApp.openById('DOCUMENT_ID');

// Create and open a document.
doc = DocumentApp.create('Document Name');

کلاس‌ها

نام شرح مختصر
Attribute شمارشی از ویژگی‌های عنصر.
Body محتوای یک برگه در یک سند Google Docs.
Bookmark یک شیء که نشان دهنده یک نشانه گذاری (bookmark) است.
Container Element یک عنصر عمومی که ممکن است شامل عناصر دیگری باشد.
Date عنصری که تاریخ قالب‌بندی شده را نشان می‌دهد
Document سندی که شامل یک یا چند شیء Tab است که هر کدام شامل متن غنی و عناصری مانند جداول و لیست‌ها هستند.
Document App سرویس سند، Documents ایجاد و باز می‌کند که قابل ویرایش هستند.
Document Tab یک برگه سند، حاوی متن غنی و عناصری مانند جداول و لیست‌ها.
Element یک عنصر عمومی.
Element Type شمارشی از تمام انواع عناصر.
Equation عنصری که یک عبارت ریاضی را نشان می‌دهد.
Equation Function عنصری که نشان دهنده یک تابع در یک Equation ریاضی است.
Equation Function Argument Separator عنصری که جداکننده تابع را در یک Equation ریاضی نشان می‌دهد.
Equation Symbol عنصری که نمایانگر یک نماد در یک Equation ریاضی است.
Font Family فهرستی از فونت‌های پشتیبانی‌شده
Footer Section عنصری که نشان‌دهنده‌ی بخش پاورقی است.
Footnote عنصری که نشان‌دهنده‌ی یک پاورقی است.
Footnote Section عنصری که نشان‌دهنده‌ی یک بخش پاورقی است.
Glyph Type فهرستی از انواع گلیف‌های پشتیبانی‌شده.
Header Section عنصری که نشان‌دهنده‌ی یک بخش هدر است.
Horizontal Alignment فهرستی از انواع ترازبندی افقی پشتیبانی شده.
Horizontal Rule عنصری که نشان دهنده یک خط افقی است.
Inline Drawing عنصری که نمایانگر یک نقاشی جاسازی‌شده است.
Inline Image عنصری که نشان دهنده یک تصویر جاسازی شده است.
List Item عنصری که یک آیتم لیست را نشان می‌دهد.
Named Range Range که دارای نام و شناسه است تا امکان بازیابی بعدی فراهم شود.
Page Break عنصری که نشان‌دهنده‌ی یک شکست صفحه است.
Paragraph عنصری که نمایانگر یک پاراگراف است.
Paragraph Heading فهرستی از سرتیترهای استاندارد پاراگراف.
Person عنصری که نشان‌دهنده‌ی پیوندی به یک شخص است.
Position ارجاع به مکانی در تب سند، نسبت به یک عنصر خاص.
Positioned Image تصویر با موقعیت ثابت که به یک Paragraph متصل شده است.
Positioned Layout یک نوع شمارش که نحوه چیدمان یک Positioned Image نسبت به متن اطراف مشخص می‌کند.
Range طیف وسیعی از عناصر در یک سند.
Range Builder سازنده‌ای که برای ساخت اشیاء Range از عناصر سند استفاده می‌شود.
Range Element یک پوشش (wrapper) دور یک Element با امکان تغییر فاصله شروع و پایان.
Rich Link عنصری که نشان‌دهنده‌ی پیوندی به یک منبع گوگل، مانند یک فایل درایو یا یک ویدیوی یوتیوب است.
Tab یک برگه در یک سند Google Docs.
Tab Type فهرستی از تمام انواع تب‌ها.
Table عنصری که نشان دهنده یک جدول است.
Table Cell عنصری که نشان‌دهنده‌ی یک سلول جدول است.
Table Of Contents عنصری که شامل فهرست مطالب است.
Table Row عنصری که نشان دهنده یک ردیف جدول است.
Text عنصری که نشان‌دهنده‌ی یک ناحیه‌ی متنی غنی است.
Text Alignment شمارشی از انواع ترازبندی متن.
Unsupported Element عنصری که نشان‌دهنده‌ی ناحیه‌ای است که ناشناخته است یا نمی‌تواند تحت تأثیر یک اسکریپت قرار گیرد، مانند شماره صفحه.
Vertical Alignment فهرستی از انواع ترازبندی عمودی پشتیبانی شده.

Attribute

خواص

ملک نوع توضیحات
BACKGROUND_COLOR Enum رنگ پس‌زمینه یک عنصر (پاراگراف، جدول و غیره) یا سند.
BOLD Enum تنظیم ضخامت فونت، برای متن غنی.
BORDER_COLOR Enum رنگ حاشیه، برای عناصر جدول.
BORDER_WIDTH Enum عرض حاشیه بر حسب نقطه، برای عناصر جدول.
CODE Enum محتویات کد، برای عناصر معادله.
FONT_FAMILY Enum تنظیمات خانواده فونت، برای متن غنی.
FONT_SIZE Enum تنظیم اندازه فونت بر حسب نقطه، برای متن غنی.
FOREGROUND_COLOR Enum تنظیم رنگ پیش‌زمینه، برای متن غنی.
HEADING Enum نوع عنوان، برای عناصر پاراگراف (برای مثال، Document App.ParagraphHeading.HEADING1 ).
HEIGHT Enum تنظیم ارتفاع، برای عناصر تصویر.
HORIZONTAL_ALIGNMENT Enum تراز افقی، برای عناصر پاراگراف (برای مثال، Document App.HorizontalAlignment.CENTER ).
INDENT_END Enum تنظیم تورفتگی انتهای عناصر پاراگراف بر حسب نقطه.
INDENT_FIRST_LINE Enum تنظیم تورفتگی خط اول بر حسب نقطه، برای عناصر پاراگراف.
INDENT_START Enum تنظیم شروع تورفتگی بر حسب نقطه، برای عناصر پاراگراف.
ITALIC Enum تنظیم سبک فونت، برای متن غنی.
GLYPH_TYPE Enum نوع glyph، برای عناصر آیتم لیست.
LEFT_TO_RIGHT Enum تنظیم جهت متن، برای متن غنی.
LINE_SPACING Enum تنظیم فاصله خطوط به عنوان ضریب، برای عناصر پاراگراف.
LINK_URL Enum آدرس لینک، برای متن غنی.
LIST_ID Enum شناسه‌ی لیست فراگیر، برای عناصر آیتم لیست.
MARGIN_BOTTOM Enum تنظیم حاشیه پایین بر حسب نقطه، برای عناصر پاراگراف.
MARGIN_LEFT Enum تنظیم حاشیه چپ بر حسب نقطه، برای عناصر پاراگراف.
MARGIN_RIGHT Enum تنظیم حاشیه سمت راست بر حسب نقطه، برای عناصر پاراگراف.
MARGIN_TOP Enum تنظیم حاشیه بالا بر حسب نقطه، برای عناصر پاراگراف.
NESTING_LEVEL Enum سطح تودرتوسازی آیتم، برای عناصر آیتم لیست.
MINIMUM_HEIGHT Enum تنظیم حداقل ارتفاع بر حسب نقطه، برای عناصر ردیف جدول.
PADDING_BOTTOM Enum تنظیم padding پایین بر حسب نقطه، برای عناصر سلول جدول.
PADDING_LEFT Enum تنظیم فاصله‌ی چپ (left padding) بر حسب نقطه، برای عناصر خانه‌ی جدول.
PADDING_RIGHT Enum تنظیم صحیح فاصله‌گذاری (padding) بر حسب نقطه، برای عناصر سلول جدول.
PADDING_TOP Enum تنظیم فاصله‌ی بین عناصر جدول بر حسب نقطه.
PAGE_HEIGHT Enum تنظیم ارتفاع صفحه بر حسب نقطه، برای اسناد.
PAGE_WIDTH Enum تنظیم عرض صفحه بر حسب نقطه، برای اسناد.
SPACING_AFTER Enum تنظیم فاصله پایین بر حسب نقطه، برای عناصر پاراگراف.
SPACING_BEFORE Enum تنظیم فاصله بالا بر حسب نقطه، برای عناصر پاراگراف.
STRIKETHROUGH Enum تنظیم خط خورده، برای متن غنی.
UNDERLINE Enum تنظیمات زیرخط، برای متن غنی.
VERTICAL_ALIGNMENT Enum تنظیم تراز عمودی، برای عناصر سلول جدول.
WIDTH Enum تنظیم عرض، برای سلول‌های جدول و عناصر تصویر.

Body

روش‌ها

روش نوع بازگشتی شرح مختصر
append Horizontal Rule() Horizontal Rule یک Horizontal Rule جدید ایجاد و اضافه می‌کند.
append Image(image) Inline Image یک Inline Image جدید از بلوک تصویر مشخص‌شده ایجاد و اضافه می‌کند.
append Image(image) Inline Image Inline Image داده شده را اضافه می‌کند.
append List Item(listItem) List Item List Item داده شده را اضافه می‌کند.
append List Item(text) List Item یک List Item جدید حاوی محتوای متنی مشخص شده ایجاد و اضافه می‌کند.
append Page Break() Page Break یک Page Break جدید ایجاد و اضافه می‌کند.
append Page Break(pageBreak) Page Break Page Break داده شده را اضافه می‌کند.
append Paragraph(paragraph) Paragraph Paragraph داده شده را اضافه می‌کند.
append Paragraph(text) Paragraph یک Paragraph جدید حاوی محتوای متن مشخص شده ایجاد و اضافه می‌کند.
append Table() Table یک Table جدید ایجاد و اضافه می‌کند.
append Table(cells) Table یک Table جدید شامل یک Table Cell برای هر مقدار رشته‌ای مشخص شده اضافه می‌کند.
append Table(table) Table Table داده شده را ضمیمه می‌کند.
clear() Body محتویات عنصر را پاک می‌کند.
copy() Body یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Heading Attributes(paragraphHeading) Object مجموعه ویژگی‌های Paragraph Heading ارائه شده را بازیابی می‌کند.
get Images() Inline Image[] |null تمام Inline Images موجود در بخش را بازیابی می‌کند.
get List Items() List Item[] |null تمام List Items موجود در بخش را بازیابی می‌کند.
get Margin Bottom() Number|null حاشیه پایین را بر حسب نقطه بازیابی می‌کند.
get Margin Left() Number|null حاشیه سمت چپ را بر حسب نقطه بازیابی می‌کند.
get Margin Right() Number|null حاشیه سمت راست را بازیابی می‌کند.
get Margin Top() Number|null حاشیه بالایی را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Page Height() Number|null ارتفاع صفحه را بر حسب نقطه برمی‌گرداند.
get Page Width() Number|null عرض صفحه را بر حسب نقطه برمی‌گرداند.
get Paragraphs() Paragraph[] |null تمام Paragraphs موجود در بخش (شامل List Items ) را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Tables() Table[] |null تمام Tables موجود در بخش را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
insert Horizontal Rule(childIndex) Horizontal Rule یک Horizontal Rule جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image یک Inline Image از بلوک تصویر مشخص‌شده، در اندیس مشخص‌شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image Inline Image داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, listItem) List Item List Item داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, text) List Item یک List Item جدید را در اندیس مشخص شده ایجاد و درج می‌کند که حاوی محتوای متنی مشخص شده است.
insert Page Break(childIndex) Page Break یک Page Break جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Page Break(childIndex, pageBreak) Page Break Page Break داده شده را در فهرست مشخص شده وارد می‌کند.
insert Paragraph(childIndex, paragraph) Paragraph Paragraph داده شده را در اندیس مشخص شده درج می‌کند.
insert Paragraph(childIndex, text) Paragraph یک Paragraph جدید ایجاد و در فهرست مشخص شده درج می‌کند که حاوی محتوای متن مشخص شده است.
insert Table(childIndex) Table یک Table جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, cells) Table یک Table جدید حاوی سلول‌های مشخص شده، در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, table) Table Table داده شده را در اندیس مشخص شده درج می‌کند.
remove Child(child) Body عنصر فرزند مشخص شده را حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Body ویژگی‌های عنصر را تنظیم می‌کند.
set Heading Attributes(paragraphHeading, attributes) Body ویژگی‌های Paragraph Heading ارائه شده را تنظیم می‌کند.
set Margin Bottom(marginBottom) Body حاشیه پایین را بر حسب نقطه تنظیم می‌کند.
set Margin Left(marginLeft) Body حاشیه سمت چپ را بر حسب نقطه تنظیم می‌کند.
set Margin Right(marginRight) Body حاشیه سمت راست را بر حسب نقطه تنظیم می‌کند.
set Margin Top(marginTop) Body حاشیه بالا را تنظیم می‌کند.
set Page Height(pageHeight) Body ارتفاع صفحه را بر حسب نقطه تنظیم می‌کند.
set Page Width(pageWidth) Body عرض صفحه را بر حسب نقطه تنظیم می‌کند.
set Text(text) Body محتوا را به صورت متن ساده تنظیم می‌کند.
set Text Alignment(textAlignment) Body ترازبندی متن را تنظیم می‌کند.

Bookmark

روش‌ها

روش نوع بازگشتی شرح مختصر
get Id() String شناسه‌ی Bookmark را دریافت می‌کند.
get Position() Position Position Bookmark را در Document Tab دریافت می‌کند.
remove() void Bookmark را حذف می‌کند.

Container Element

روش‌ها

روش نوع بازگشتی شرح مختصر
as Body() Body عنصر فعلی را به عنوان یک Body برمی‌گرداند.
as Equation() Equation عنصر فعلی را به عنوان یک Equation برمی‌گرداند.
as Footer Section() Footer Section عنصر فعلی را به عنوان یک Footer Section برمی‌گرداند.
as Footnote Section() Footnote Section عنصر فعلی را به عنوان یک Footnote Section برمی‌گرداند.
as Header Section() Header Section عنصر فعلی را به عنوان یک Header Section برمی‌گرداند.
as List Item() List Item عنصر فعلی را به عنوان یک List Item برمی‌گرداند.
as Paragraph() Paragraph عنصر فعلی را به عنوان یک Paragraph برمی‌گرداند.
as Table() Table عنصر فعلی را به عنوان یک Table برمی‌گرداند.
as Table Cell() Table Cell عنصر فعلی را به عنوان یک Table Cell برمی‌گرداند.
as Table Of Contents() Table Of Contents عنصر فعلی را به عنوان یک Table Of Contents برمی‌گرداند.
as Table Row() Table Row عنصر فعلی را به عنوان یک Table Row برمی‌گرداند.
clear() Container Element محتویات عنصر را پاک می‌کند.
copy() Container Element یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Link Url() String|null آدرس لینک را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Container Element |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Container Element |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Container Element ویژگی‌های عنصر را تنظیم می‌کند.
set Link Url(url) Container Element آدرس لینک را تنظیم می‌کند.
set Text Alignment(textAlignment) Container Element ترازبندی متن را تنظیم می‌کند.

Date

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Date یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Display Text() String مقدار نمایشی که در سند رندر شده است را برمی‌گرداند.
get Locale() String محلی که برای نمایش مقدار تاریخ استفاده شده است را برمی‌گرداند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Timestamp() Date مهر زمانی مرتبط با تاریخ را برمی‌گرداند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Date |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Date |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Date ویژگی‌های عنصر را تنظیم می‌کند.

Document

روش‌ها

روش نوع بازگشتی شرح مختصر
add Bookmark(position) Bookmark یک Bookmark در Position داده شده به اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، به تب فعال اضافه می‌کند.
add Editor(emailAddress) Document کاربر داده شده را به لیست ویرایشگران Document اضافه می‌کند.
add Editor(user) Document کاربر داده شده را به لیست ویرایشگران Document اضافه می‌کند.
add Editors(emailAddresses) Document آرایه‌ی داده شده از کاربران را به لیست ویرایشگران Document اضافه می‌کند.
add Footer() Footer Section اگر بخشی در پاورقی وجود نداشته باشد، آن را به اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، به تب فعال اضافه می‌کند.
add Header() Header Section اگر بخش سربرگ وجود نداشته باشد، آن را به اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، به تب فعال اضافه می‌کند.
add Named Range(name, range) Named Range یک Named Range اضافه می‌کند، که Range است که دارای نام و شناسه برای استفاده در بازیابی‌های بعدی، در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال، می‌باشد.
add Viewer(emailAddress) Document کاربر داده شده را به لیست بینندگان Document اضافه می‌کند.
add Viewer(user) Document کاربر داده شده را به لیست بینندگان Document اضافه می‌کند.
add Viewers(emailAddresses) Document آرایه‌ی داده شده از کاربران را به لیست بینندگان Document اضافه می‌کند.
get Active Tab() Tab |null Tab فعال فعلی کاربر در سند را برمی‌گرداند.
get As(contentType) Blob محتویات Document فعلی را به صورت یک blob از نوع مشخص شده بازیابی می‌کند.
get Blob() Blob محتوای Document فعلی را به صورت یک حباب (blob) بازیابی می‌کند.
get Body() Body Body اولین تب یا، برای اسکریپت‌هایی که به یک سند متصل هستند، Document Body Section تب فعال را بازیابی می‌کند.
get Bookmark(id) Bookmark |null Bookmark با شناسه‌ی داده شده در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال دریافت می‌کند.
get Bookmarks() Bookmark[] تمام اشیاء Bookmark را در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال دریافت می‌کند.
get Cursor() Position |null مکان‌نمای کاربر را در تب فعال دریافت می‌کند.
get Editors() User[] لیست ویرایشگران این Document را دریافت می‌کند.
get Footer() Footer Section |null بخش پاورقی اولین تب یا، برای اسکریپت‌هایی که به یک سند متصل هستند، بخش پاورقی تب فعال را بازیابی می‌کند.
get Footnotes() Footnote[] تمام عناصر Footnote را در بدنه‌ی اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در بدنه‌ی تب فعال بازیابی می‌کند.
get Header() Header Section |null بخش سربرگ اولین تب یا، برای اسکریپت‌هایی که به یک سند متصل هستند، بخش سربرگ تب فعال را بازیابی می‌کند.
get Id() String شناسه منحصر به فرد سند را بازیابی می‌کند.
get Language() String|null کد زبان سند را دریافت می‌کند.
get Name() String عنوان سند را بازیابی می‌کند.
get Named Range By Id(id) Named Range |null Named Range با شناسه داده شده در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال را دریافت می‌کند.
get Named Ranges() Named Range[] تمام اشیاء Named Range را در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال دریافت می‌کند.
get Named Ranges(name) Named Range[] تمام اشیاء Named Range را با نام داده شده در اولین تب یا برای اسکریپت‌هایی که به یک سند متصل هستند، در تب فعال دریافت می‌کند.
get Selection() Range |null انتخاب کاربر را در تب فعال دریافت می‌کند.
get Supported Language Codes() String[] تمام کدهای زبانی که در فایل‌های Google Docs پشتیبانی می‌شوند را دریافت می‌کند.
get Tab(tabId) Tab |null Tab با شناسه (ID) مشخص شده را دریافت می‌کند.
get Tabs() Tab[] تمام Tab غیر تو در تو که بخشی از سند هستند را دریافت می‌کند.
get Url() String آدرس اینترنتی (URL) را برای دسترسی به سند فعلی بازیابی می‌کند.
get Viewers() User[] لیست بینندگان و نظردهندگان این Document را دریافت می‌کند.
new Position(element, offset) Position یک Position جدید ایجاد می‌کند که ارجاعی به مکانی در تب، نسبت به یک عنصر خاص در تب اول یا برای اسکریپت‌هایی که به یک سند متصل هستند، نسبت به تب فعال است.
new Range() Range Builder یک سازنده ایجاد می‌کند که برای ساخت اشیاء Range از عناصر tab در اولین tab یا برای اسکریپت‌هایی که به یک سند متصل هستند، از tab فعال استفاده می‌شود.
remove Editor(emailAddress) Document کاربر داده شده را از لیست ویرایشگران Document حذف می‌کند.
remove Editor(user) Document کاربر داده شده را از لیست ویرایشگران Document حذف می‌کند.
remove Viewer(emailAddress) Document کاربر داده شده را از لیست بینندگان و نظردهندگان Document حذف می‌کند.
remove Viewer(user) Document کاربر داده شده را از لیست بینندگان و نظردهندگان Document حذف می‌کند.
save And Close() void Document فعلی را ذخیره می‌کند.
set Active Tab(tabId) void Tab انتخاب شده توسط کاربر در سند فعلی را به تبی با شناسه مشخص شده تنظیم می‌کند.
set Cursor(position) Document مکان‌نمای کاربر را با توجه به Position تنظیم می‌کند.
set Language(languageCode) Document کد زبان سند را تنظیم می‌کند.
set Name(name) Document عنوان سند را تنظیم می‌کند.
set Selection(range) Document با توجه به Range ، انتخاب کاربر را در تب فعال تنظیم می‌کند.

Document App

خواص

ملک نوع توضیحات
Attribute Attribute شمارش Attribute .
Element Type Element Type شمارش Element Type .
Font Family Font Family شمارش Font Family .
Glyph Type Glyph Type شمارش Glyph Type .
Horizontal Alignment Horizontal Alignment شمارش Horizontal Alignment .
Paragraph Heading Paragraph Heading شمارش Paragraph Heading .
Positioned Layout Positioned Layout شمارش Positioned Layout .
Text Alignment Text Alignment شمارش Text Alignment .
Vertical Alignment Vertical Alignment شمارش Vertical Alignment .

روش‌ها

روش نوع بازگشتی شرح مختصر
create(name) Document یک سند جدید ایجاد و برمی‌گرداند.
get Active Document() Document سندی را که اسکریپت به آن متصل است، برمی‌گرداند.
get Ui() Ui نمونه‌ای از محیط رابط کاربری سند را برمی‌گرداند که به اسکریپت اجازه می‌دهد ویژگی‌هایی مانند منوها، کادرهای محاوره‌ای و نوارهای کناری را اضافه کند.
open By Id(id) Document سند را با شناسه مشخص شده برمی‌گرداند.
open By Url(url) Document سند را با URL مشخص شده باز کرده و برمی‌گرداند.

Document Tab

روش‌ها

روش نوع بازگشتی شرح مختصر
add Bookmark(position) Bookmark یک Bookmark در Position داده شده اضافه می‌کند.
add Footer() Footer Section اگر بخشی در پاورقی برگه وجود نداشته باشد، آن را اضافه می‌کند.
add Header() Header Section اگر بخشی برای سربرگ تب وجود نداشته باشد، آن را اضافه می‌کند.
add Named Range(name, range) Named Range یک Named Range اضافه می‌کند، که Range است که دارای نام و شناسه برای استفاده در بازیابی‌های بعدی است.
get Body() Body Body تب را بازیابی می‌کند.
get Bookmark(id) Bookmark |null Bookmark با شناسه‌ی داده شده دریافت می‌کند.
get Bookmarks() Bookmark[] تمام اشیاء Bookmark در تب را دریافت می‌کند.
get Footer() Footer Section |null در صورت وجود، بخش پاورقی برگه را بازیابی می‌کند.
get Footnotes() Footnote[] |null تمام عناصر Footnote را در بدنه تب بازیابی می‌کند.
get Header() Header Section |null در صورت وجود، بخش سربرگ تب را بازیابی می‌کند.
get Named Range By Id(id) Named Range |null Named Range با شناسه‌ی داده شده را دریافت می‌کند.
get Named Ranges() Named Range[] تمام اشیاء Named Range را در برگه دریافت می‌کند.
get Named Ranges(name) Named Range[] تمام اشیاء Named Range را در تب با نام داده شده دریافت می‌کند.
new Position(element, offset) Position یک Position جدید ایجاد می‌کند که ارجاعی به مکانی در تب، نسبت به یک عنصر خاص است.
new Range() Range Builder یک سازنده ایجاد می‌کند که برای ساخت اشیاء Range از عناصر tab استفاده می‌شود.

Element

روش‌ها

روش نوع بازگشتی شرح مختصر
as Body() Body عنصر فعلی را به عنوان یک Body برمی‌گرداند.
as Date() Date عنصر فعلی را به عنوان یک Date برمی‌گرداند.
as Equation() Equation عنصر فعلی را به عنوان یک Equation برمی‌گرداند.
as Equation Function() Equation Function عنصر فعلی را به عنوان یک Equation Function برمی‌گرداند.
as Equation Function Argument Separator() Equation Function Argument Separator عنصر فعلی را به عنوان Equation Function Argument Separator برمی‌گرداند.
as Equation Symbol() Equation Symbol عنصر فعلی را به عنوان Equation Symbol برمی‌گرداند.
as Footer Section() Footer Section عنصر فعلی را به عنوان یک Footer Section برمی‌گرداند.
as Footnote() Footnote عنصر فعلی را به عنوان یک Footnote برمی‌گرداند.
as Footnote Section() Footnote Section عنصر فعلی را به عنوان یک Footnote Section برمی‌گرداند.
as Header Section() Header Section عنصر فعلی را به عنوان یک Header Section برمی‌گرداند.
as Horizontal Rule() Horizontal Rule عنصر فعلی را به عنوان یک Horizontal Rule برمی‌گرداند.
as Inline Drawing() Inline Drawing عنصر فعلی را به عنوان یک Inline Drawing برمی‌گرداند.
as Inline Image() Inline Image عنصر فعلی را به عنوان یک Inline Image برمی‌گرداند.
as List Item() List Item عنصر فعلی را به عنوان یک List Item برمی‌گرداند.
as Page Break() Page Break عنصر فعلی را به عنوان یک Page Break برمی‌گرداند.
as Paragraph() Paragraph عنصر فعلی را به عنوان یک Paragraph برمی‌گرداند.
as Person() Person عنصر فعلی را به عنوان یک Person برمی‌گرداند.
as Rich Link() Rich Link عنصر فعلی را به عنوان یک Rich Link )، برای مثال، پیوندی به یک فایل Google Sheets، برمی‌گرداند.
as Table() Table عنصر فعلی را به عنوان یک Table برمی‌گرداند.
as Table Cell() Table Cell عنصر فعلی را به عنوان یک Table Cell برمی‌گرداند.
as Table Of Contents() Table Of Contents عنصر فعلی را به عنوان یک Table Of Contents برمی‌گرداند.
as Table Row() Table Row عنصر فعلی را به عنوان یک Table Row برمی‌گرداند.
as Text() Text عنصر فعلی را به عنوان یک Text برمی‌گرداند.
copy() Element یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Element |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Element |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Element ویژگی‌های عنصر را تنظیم می‌کند.

Element Type

خواص

ملک نوع توضیحات
BODY_SECTION Enum نوع مربوط به عنصر Body .
COMMENT_SECTION Enum نوع مربوط به عنصر Comment Section .
DATE Enum نوع مربوط به عنصر Date .
EQUATION Enum نوع مربوط به عنصر Equation .
EQUATION_FUNCTION Enum نوع مربوط به عنصر Equation Function .
EQUATION_FUNCTION_ARGUMENT_SEPARATOR Enum نوع مربوط به عنصر Equation Function Argument Separator .
EQUATION_SYMBOL Enum نوع مربوط به عنصر Equation Symbol .
RICH_LINK Enum نوع مربوط به عنصر Rich Link .
FOOTER_SECTION Enum نوع مربوط به عنصر Footer Section .
FOOTNOTE Enum نوع مربوط به عنصر Footnote .
FOOTNOTE_SECTION Enum نوع مربوط به عنصر Footnote Section .
HEADER_SECTION Enum نوع مربوط به عنصر Header Section .
HORIZONTAL_RULE Enum نوع مربوط به عنصر Horizontal Rule .
INLINE_DRAWING Enum نوع مربوط به عنصر Inline Drawing .
INLINE_IMAGE Enum نوع مربوط به عنصر Inline Image .
LIST_ITEM Enum نوع مربوط به عنصر List Item .
PAGE_BREAK Enum نوع مربوط به عنصر Page Break .
PARAGRAPH Enum نوع مربوط به عنصر Paragraph .
PERSON Enum نوع مربوط به عنصر Person .
TABLE Enum نوع مربوط به عنصر Table .
TABLE_CELL Enum نوع مربوط به عنصر Table Cell .
TABLE_OF_CONTENTS Enum نوع مربوط به عنصر Table Of Contents .
TABLE_ROW Enum نوع مربوط به عنصر Table Row .
TEXT Enum نوع مربوط به عنصر Text .
UNSUPPORTED Enum نوع مربوط به Unsupported Element .

Equation

روش‌ها

روش نوع بازگشتی شرح مختصر
clear() Equation محتویات عنصر را پاک می‌کند.
copy() Equation یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Link Url() String|null آدرس لینک را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Equation |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Equation |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Equation ویژگی‌های عنصر را تنظیم می‌کند.
set Link Url(url) Equation آدرس لینک را تنظیم می‌کند.
set Text Alignment(textAlignment) Equation ترازبندی متن را تنظیم می‌کند.

Equation Function

روش‌ها

روش نوع بازگشتی شرح مختصر
clear() Equation Function محتویات عنصر را پاک می‌کند.
copy() Equation Function یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Code() String کد مربوط به تابع معادله را بازیابی می‌کند.
get Link Url() String|null آدرس لینک را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Equation Function |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Equation Function |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Equation Function ویژگی‌های عنصر را تنظیم می‌کند.
set Link Url(url) Equation Function آدرس لینک را تنظیم می‌کند.
set Text Alignment(textAlignment) Equation Function ترازبندی متن را تنظیم می‌کند.

Equation Function Argument Separator

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Equation Function Argument Separator یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Equation Function Argument Separator |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Equation Function Argument Separator |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Equation Function Argument Separator ویژگی‌های عنصر را تنظیم می‌کند.

Equation Symbol

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Equation Symbol یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Code() String کد مربوط به نماد معادله را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Equation Symbol |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Equation Symbol |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Equation Symbol ویژگی‌های عنصر را تنظیم می‌کند.

Font Family

Footer Section

روش‌ها

روش نوع بازگشتی شرح مختصر
append Horizontal Rule() Horizontal Rule یک Horizontal Rule جدید ایجاد و اضافه می‌کند.
append Image(image) Inline Image یک Inline Image جدید از بلوک تصویر مشخص‌شده ایجاد و اضافه می‌کند.
append Image(image) Inline Image Inline Image داده شده را اضافه می‌کند.
append List Item(listItem) List Item List Item داده شده را اضافه می‌کند.
append List Item(text) List Item یک List Item جدید حاوی محتوای متنی مشخص شده ایجاد و اضافه می‌کند.
append Paragraph(paragraph) Paragraph Paragraph داده شده را اضافه می‌کند.
append Paragraph(text) Paragraph یک Paragraph جدید حاوی محتوای متن مشخص شده ایجاد و اضافه می‌کند.
append Table() Table یک Table جدید ایجاد و اضافه می‌کند.
append Table(cells) Table یک Table جدید شامل یک Table Cell برای هر مقدار رشته‌ای مشخص شده اضافه می‌کند.
append Table(table) Table Table داده شده را ضمیمه می‌کند.
clear() Footer Section محتویات عنصر را پاک می‌کند.
copy() Footer Section یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Images() Inline Image[] |null تمام Inline Images موجود در بخش را بازیابی می‌کند.
get List Items() List Item[] |null تمام List Items موجود در بخش را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Paragraphs() Paragraph[] |null تمام Paragraphs موجود در بخش (شامل List Items ) را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Tables() Table[] |null تمام Tables موجود در بخش را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
insert Horizontal Rule(childIndex) Horizontal Rule یک Horizontal Rule جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image یک Inline Image از بلوک تصویر مشخص‌شده، در اندیس مشخص‌شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image Inline Image داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, listItem) List Item List Item داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, text) List Item یک List Item جدید را در اندیس مشخص شده ایجاد و درج می‌کند که حاوی محتوای متنی مشخص شده است.
insert Paragraph(childIndex, paragraph) Paragraph Paragraph داده شده را در اندیس مشخص شده درج می‌کند.
insert Paragraph(childIndex, text) Paragraph یک Paragraph جدید ایجاد و در فهرست مشخص شده درج می‌کند که حاوی محتوای متن مشخص شده است.
insert Table(childIndex) Table یک Table جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, cells) Table یک Table جدید حاوی سلول‌های مشخص شده، در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, table) Table Table داده شده را در اندیس مشخص شده درج می‌کند.
remove Child(child) Footer Section عنصر فرزند مشخص شده را حذف می‌کند.
remove From Parent() Footer Section |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Footer Section ویژگی‌های عنصر را تنظیم می‌کند.
set Text(text) Footer Section محتوا را به صورت متن ساده تنظیم می‌کند.
set Text Alignment(textAlignment) Footer Section ترازبندی متن را تنظیم می‌کند.

Footnote

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Footnote یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Footnote Contents() Footnote Section |null محتویات عنصر پاورقی را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
remove From Parent() Footnote |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Footnote ویژگی‌های عنصر را تنظیم می‌کند.

Footnote Section

روش‌ها

روش نوع بازگشتی شرح مختصر
append Paragraph(paragraph) Paragraph Paragraph داده شده را اضافه می‌کند.
append Paragraph(text) Paragraph یک Paragraph جدید حاوی محتوای متن مشخص شده ایجاد و اضافه می‌کند.
clear() Footnote Section محتویات عنصر را پاک می‌کند.
copy() Footnote Section یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Paragraphs() Paragraph[] |null تمام Paragraphs موجود در بخش (شامل List Items ) را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
insert Paragraph(childIndex, paragraph) Paragraph Paragraph داده شده را در اندیس مشخص شده درج می‌کند.
insert Paragraph(childIndex, text) Paragraph یک Paragraph جدید ایجاد و در فهرست مشخص شده درج می‌کند که حاوی محتوای متن مشخص شده است.
remove Child(child) Footnote Section عنصر فرزند مشخص شده را حذف می‌کند.
remove From Parent() Footnote Section |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Footnote Section ویژگی‌های عنصر را تنظیم می‌کند.
set Text(text) Footnote Section محتوا را به صورت متن ساده تنظیم می‌کند.
set Text Alignment(textAlignment) Footnote Section ترازبندی متن را تنظیم می‌کند.

Glyph Type

خواص

ملک نوع توضیحات
BULLET Enum گلوله پیش‌فرض، دایره‌ای و توپر.
HOLLOW_BULLET Enum یک گلوله توخالی.
SQUARE_BULLET Enum یک گلوله مربعی.
NUMBER Enum یک بولت مبتنی بر عدد.
LATIN_UPPER Enum یک علامت با حروف بزرگ لاتین.
LATIN_LOWER Enum یک گلوله لاتین با حروف کوچک.
ROMAN_UPPER Enum یک عدد رومی، گلوله با حروف بزرگ.
ROMAN_LOWER Enum یک عدد رومی، گلوله با حروف کوچک.

Header Section

روش‌ها

روش نوع بازگشتی شرح مختصر
append Horizontal Rule() Horizontal Rule یک Horizontal Rule جدید ایجاد و اضافه می‌کند.
append Image(image) Inline Image یک Inline Image جدید از بلوک تصویر مشخص‌شده ایجاد و اضافه می‌کند.
append Image(image) Inline Image Inline Image داده شده را اضافه می‌کند.
append List Item(listItem) List Item List Item داده شده را اضافه می‌کند.
append List Item(text) List Item یک List Item جدید حاوی محتوای متنی مشخص شده ایجاد و اضافه می‌کند.
append Paragraph(paragraph) Paragraph Paragraph داده شده را اضافه می‌کند.
append Paragraph(text) Paragraph یک Paragraph جدید حاوی محتوای متن مشخص شده ایجاد و اضافه می‌کند.
append Table() Table یک Table جدید ایجاد و اضافه می‌کند.
append Table(cells) Table یک Table جدید شامل یک Table Cell برای هر مقدار رشته‌ای مشخص شده اضافه می‌کند.
append Table(table) Table Table داده شده را ضمیمه می‌کند.
clear() Header Section محتویات عنصر را پاک می‌کند.
copy() Header Section یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
edit As Text() Text یک نسخه Text از عنصر فعلی را برای ویرایش دریافت می‌کند.
find Element(elementType) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده جستجو می‌کند.
find Element(elementType, from) Range Element |null محتویات عنصر را برای یافتن نسلی از نوع مشخص شده، با شروع از Range Element مشخص شده، جستجو می‌کند.
find Text(searchPattern) Range Element |null با استفاده از عبارات منظم، محتوای عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
find Text(searchPattern, from) Range Element |null با شروع از یک نتیجه جستجوی داده شده، محتویات عنصر را برای الگوی متنی مشخص شده جستجو می‌کند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Child(childIndex) Element عنصر فرزند را در اندیس فرزند مشخص شده بازیابی می‌کند.
get Child Index(child) Integer اندیس فرزند را برای عنصر فرزند مشخص شده بازیابی می‌کند.
get Images() Inline Image[] |null تمام Inline Images موجود در بخش را بازیابی می‌کند.
get List Items() List Item[] |null تمام List Items موجود در بخش را بازیابی می‌کند.
get Num Children() Integer تعداد فرزندان را بازیابی می‌کند.
get Paragraphs() Paragraph[] |null تمام Paragraphs موجود در بخش (شامل List Items ) را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Tables() Table[] |null تمام Tables موجود در بخش را بازیابی می‌کند.
get Text() String محتوای عنصر را به صورت یک رشته متنی بازیابی می‌کند.
get Text Alignment() Text Alignment |null ترازبندی متن را دریافت می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
insert Horizontal Rule(childIndex) Horizontal Rule یک Horizontal Rule جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image یک Inline Image از بلوک تصویر مشخص‌شده، در اندیس مشخص‌شده ایجاد و درج می‌کند.
insert Image(childIndex, image) Inline Image Inline Image داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, listItem) List Item List Item داده شده را در اندیس مشخص شده درج می‌کند.
insert List Item(childIndex, text) List Item یک List Item جدید را در اندیس مشخص شده ایجاد و درج می‌کند که حاوی محتوای متنی مشخص شده است.
insert Paragraph(childIndex, paragraph) Paragraph Paragraph داده شده را در اندیس مشخص شده درج می‌کند.
insert Paragraph(childIndex, text) Paragraph یک Paragraph جدید ایجاد و در فهرست مشخص شده درج می‌کند که حاوی محتوای متن مشخص شده است.
insert Table(childIndex) Table یک Table جدید در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, cells) Table یک Table جدید حاوی سلول‌های مشخص شده، در اندیس مشخص شده ایجاد و درج می‌کند.
insert Table(childIndex, table) Table Table داده شده را در اندیس مشخص شده درج می‌کند.
remove Child(child) Header Section عنصر فرزند مشخص شده را حذف می‌کند.
remove From Parent() Header Section |null عنصر را از والدش حذف می‌کند.
replace Text(searchPattern, replacement) Element با استفاده از عبارات منظم، تمام موارد تکرار یک الگوی متنی مشخص را با یک رشته جایگزین مشخص جایگزین می‌کند.
set Attributes(attributes) Header Section ویژگی‌های عنصر را تنظیم می‌کند.
set Text(text) Header Section محتوا را به صورت متن ساده تنظیم می‌کند.
set Text Alignment(textAlignment) Header Section ترازبندی متن را تنظیم می‌کند.

Horizontal Alignment

خواص

ملک نوع توضیحات
LEFT Enum گزینه ترازبندی چپ.
CENTER Enum گزینه ترازبندی در مرکز.
RIGHT Enum گزینه ترازبندی از راست.
JUSTIFY Enum گزینه ترازبندی توجیهی.

Horizontal Rule

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Horizontal Rule یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
remove From Parent() Horizontal Rule |null عنصر را از والدش حذف می‌کند.
set Attributes(attributes) Horizontal Rule ویژگی‌های عنصر را تنظیم می‌کند.

Inline Drawing

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Inline Drawing یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Alt Description() String|null توضیحات جایگزین نقاشی را برمی‌گرداند.
get Alt Title() String|null عنوان جایگزین نقاشی را برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null عنصر خواهر و برادر قبلی عنصر را بازیابی می‌کند.
get Type() Element Type Element Type را بازیابی می‌کند.
is At Document End() Boolean تعیین می‌کند که آیا عنصر در انتهای Document قرار دارد یا خیر.
merge() Inline Drawing |null عنصر را با عنصر خواهر یا برادر قبلی از همان نوع ادغام می‌کند.
remove From Parent() Inline Drawing |null عنصر را از والدش حذف می‌کند.
set Alt Description(description) Inline Drawing توضیحات جایگزین نقاشی را تنظیم می‌کند.
set Alt Title(title) Inline Drawing عنوان جایگزین نقاشی را تنظیم می‌کند.
set Attributes(attributes) Inline Drawing ویژگی‌های عنصر را تنظیم می‌کند.

Inline Image

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Inline Image یک کپی جدا و عمیق از عنصر فعلی را برمی‌گرداند.
get Alt Description() String|null توضیحات جایگزین تصویر را برمی‌گرداند.
get Alt Title() String|null عنوان جایگزین تصویر را برمی‌گرداند.
get As(contentType) Blob داده‌های درون این شیء را به صورت یک blob تبدیل‌شده به نوع محتوای مشخص‌شده، برمی‌گرداند.
get Attributes() Object ویژگی‌های عنصر را بازیابی می‌کند.
get Blob() Blob داده‌های درون این شیء را به صورت یک blob برمی‌گرداند.
get Height() Integer ارتفاع تصویر را بر حسب پیکسل بازیابی می‌کند.
get Link Url() String|null آدرس لینک را بازیابی می‌کند.
get Next Sibling() Element |null عنصر خواهر یا برادر بعدی عنصر را بازیابی می‌کند.
get Parent() Container Element |null عنصر والد عنصر را بازیابی می‌کند.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Type() Element Type Retrieves the element's Element Type .
get Width() Integer Retrieves the image's width, in pixels.
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Inline Image |null Merges the element with the preceding sibling of the same type.
remove From Parent() Inline Image |null Removes the element from its parent.
set Alt Description(description) Inline Image Sets the image's alternate description.
set Alt Title(title) Inline Image Sets the image's alternate title.
set Attributes(attributes) Inline Image Sets the element's attributes.
set Height(height) Inline Image Sets the image's height, in pixels.
set Link Url(url) Inline Image Sets the link URL.
set Width(width) Inline Image Sets the image's width, in pixels.

List Item

روش‌ها

روش نوع بازگشتی شرح مختصر
add Positioned Image(image) Positioned Image Creates and inserts a new Positioned Image from the specified image blob.
append Horizontal Rule() Horizontal Rule Creates and appends a new Horizontal Rule .
append Inline Image(image) Inline Image Creates and appends a new Inline Image from the specified image blob.
append Inline Image(image) Inline Image Appends the given Inline Image .
append Page Break() Page Break Creates and appends a new Page Break .
append Page Break(pageBreak) Page Break Appends the given Page Break .
append Text(text) Text Creates and appends a new Text element with the specified contents.
append Text(text) Text Appends the given Text element.
clear() List Item Clears the contents of the element.
copy() List Item Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Alignment() Horizontal Alignment |null Retrieves the Horizontal Alignment .
get Attributes() Object Retrieves the element's attributes.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Glyph Type() Glyph Type |null Retrieves the list item's Glyph Type .
get Heading() Paragraph Heading |null Retrieves the Paragraph Heading .
get Indent End() Number|null Retrieves the end indentation, in points.
get Indent First Line() Number|null Retrieves the first line indentation, in points.
get Indent Start() Number|null Retrieves the start indentation.
get Line Spacing() Number|null Retrieves the line spacing, in points.
get Link Url() String|null Retrieves the link url.
get List Id() String|null Retrieves the list ID.
get Nesting Level() Integer Retrieves the list item's nesting level.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Children() Integer Retrieves the number of children.
get Parent() Container Element |null Retrieves the element's parent element.
get Positioned Image(id) Positioned Image Gets a Positioned Image by the image's ID.
get Positioned Images() Positioned Image[] Gets all Positioned Image objects anchored to the paragraph.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Spacing After() Number|null Retrieves the spacing after the element, in points.
get Spacing Before() Number|null Retrieves the spacing before the element, in points.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
insert Horizontal Rule(childIndex) Horizontal Rule Creates and inserts a Horizontal Rule at the specified index.
insert Inline Image(childIndex, image) Inline Image Creates and inserts a new Inline Image from the specified image blob, at the specified index.
insert Inline Image(childIndex, image) Inline Image Inserts the given Inline Image at the specified index.
insert Page Break(childIndex) Page Break Creates and inserts a new Page Break at the specified index.
insert Page Break(childIndex, pageBreak) Page Break Inserts the given Page Break at the specified index.
insert Text(childIndex, text) Text Creates and inserts a new text element at the specified index.
insert Text(childIndex, text) Text Inserts the given Text element at the specified index, with the specified text contents.
is At Document End() Boolean Determines whether the element is at the end of the Document .
is Left To Right() Boolean|null Retrieves the left-to-right setting.
merge() List Item |null Merges the element with the preceding sibling of the same type.
remove Child(child) List Item Removes the specified child element.
remove From Parent() List Item |null Removes the element from its parent.
remove Positioned Image(id) Boolean Removes a Positioned Image by the image's ID.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Alignment(alignment) List Item Sets the Horizontal Alignment .
set Attributes(attributes) List Item Sets the element's attributes.
set Glyph Type(glyphType) List Item Sets the list item's Glyph Type .
set Heading(heading) List Item Sets the Paragraph Heading .
set Indent End(indentEnd) List Item Sets the end indentation, in points.
set Indent First Line(indentFirstLine) List Item Sets the first line indentation, in points.
set Indent Start(indentStart) List Item Sets the start indentation, in points.
set Left To Right(leftToRight) List Item Sets the left-to-right setting.
set Line Spacing(multiplier) List Item Sets the line spacing, as a quantity indicating the number of lines to use for spacing.
set Link Url(url) List Item Sets the link url.
set List Id(listItem) List Item Sets the list ID.
set Nesting Level(nestingLevel) List Item Sets the list item's nesting level.
set Spacing After(spacingAfter) List Item Sets the spacing after the element, in points.
set Spacing Before(spacingBefore) List Item Sets the spacing before the element, in points.
set Text(text) void Sets the contents of the list item as text.
set Text Alignment(textAlignment) List Item Sets the text alignment.

Named Range

روش‌ها

روش نوع بازگشتی شرح مختصر
get Id() String Gets the ID of this Named Range .
get Name() String Gets the name of this Named Range .
get Range() Range Gets the range of elements associated with this Named Range .
remove() void Removes this Named Range from the tab.

Page Break

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Page Break Returns a detached, deep copy of the current element.
get Attributes() Object Retrieves the element's attributes.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Type() Element Type Retrieves the element's Element Type .
is At Document End() Boolean Determines whether the element is at the end of the Document .
remove From Parent() Page Break |null Removes the element from its parent.
set Attributes(attributes) Page Break Sets the element's attributes.

Paragraph

روش‌ها

روش نوع بازگشتی شرح مختصر
add Positioned Image(image) Positioned Image Creates and inserts a new Positioned Image from the specified image blob.
append Horizontal Rule() Horizontal Rule Creates and appends a new Horizontal Rule .
append Inline Image(image) Inline Image Creates and appends a new Inline Image from the specified image blob.
append Inline Image(image) Inline Image Appends the given Inline Image .
append Page Break() Page Break Creates and appends a new Page Break .
append Page Break(pageBreak) Page Break Appends the given Page Break .
append Text(text) Text Creates and appends a new Text element with the specified contents.
append Text(text) Text Appends the given Text element.
clear() Paragraph Clears the contents of the element.
copy() Paragraph Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Alignment() Horizontal Alignment |null Retrieves the Horizontal Alignment .
get Attributes() Object Retrieves the element's attributes.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Heading() Paragraph Heading |null Retrieves the Paragraph Heading .
get Indent End() Number|null Retrieves the end indentation, in points.
get Indent First Line() Number|null Retrieves the first line indentation, in points.
get Indent Start() Number|null Retrieves the start indentation.
get Line Spacing() Number|null Retrieves the line spacing, in points.
get Link Url() String|null Retrieves the link url.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Children() Integer Retrieves the number of children.
get Parent() Container Element |null Retrieves the element's parent element.
get Positioned Image(id) Positioned Image Gets a Positioned Image by the image's ID.
get Positioned Images() Positioned Image[] Gets all Positioned Image objects anchored to the paragraph.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Spacing After() Number|null Retrieves the spacing after the element, in points.
get Spacing Before() Number|null Retrieves the spacing before the element, in points.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
insert Horizontal Rule(childIndex) Horizontal Rule Creates and inserts a Horizontal Rule at the specified index.
insert Inline Image(childIndex, image) Inline Image Creates and inserts a new Inline Image from the specified image blob, at the specified index.
insert Inline Image(childIndex, image) Inline Image Inserts the given Inline Image at the specified index.
insert Page Break(childIndex) Page Break Creates and inserts a new Page Break at the specified index.
insert Page Break(childIndex, pageBreak) Page Break Inserts the given Page Break at the specified index.
insert Text(childIndex, text) Text Creates and inserts a new text element at the specified index.
insert Text(childIndex, text) Text Inserts the given Text element at the specified index, with the specified text contents.
is At Document End() Boolean Determines whether the element is at the end of the Document .
is Left To Right() Boolean|null Retrieves the left-to-right setting.
merge() Paragraph |null Merges the element with the preceding sibling of the same type.
remove Child(child) Paragraph Removes the specified child element.
remove From Parent() Paragraph |null Removes the element from its parent.
remove Positioned Image(id) Boolean Removes a Positioned Image by the image's ID.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Alignment(alignment) Paragraph Sets the Horizontal Alignment .
set Attributes(attributes) Paragraph Sets the element's attributes.
set Heading(heading) Paragraph Sets the Paragraph Heading .
set Indent End(indentEnd) Paragraph Sets the end indentation, in points.
set Indent First Line(indentFirstLine) Paragraph Sets the first line indentation, in points.
set Indent Start(indentStart) Paragraph Sets the start indentation, in points.
set Left To Right(leftToRight) Paragraph Sets the left-to-right setting.
set Line Spacing(multiplier) Paragraph Sets the line spacing, as a quantity indicating the number of lines to use for spacing.
set Link Url(url) Paragraph Sets the link url.
set Spacing After(spacingAfter) Paragraph Sets the spacing after the element, in points.
set Spacing Before(spacingBefore) Paragraph Sets the spacing before the element, in points.
set Text(text) void Sets the contents of the paragraph as text.
set Text Alignment(textAlignment) Paragraph Sets the text alignment.

Paragraph Heading

خواص

ملک نوع توضیحات
NORMAL Enum The heading option for normal text.
HEADING1 Enum The highest heading option.
HEADING2 Enum The second heading option.
HEADING3 Enum The third heading option
HEADING4 Enum The fourth heading option.
HEADING5 Enum The fifth heading option.
HEADING6 Enum The lowest heading option.
TITLE Enum The title heading option.
SUBTITLE Enum The subtitle heading option.

Person

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Person Returns a detached, deep copy of the current element.
get Attributes() Object Retrieves the element's attributes.
get Email() String Returns the person's email address.
get Name() String|null Returns the person's display name, if set.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Type() Element Type Retrieves the element's Element Type .
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Person |null Merges the element with the preceding sibling of the same type.
remove From Parent() Person |null Removes the element from its parent.
set Attributes(attributes) Person Sets the element's attributes.

Position

روش‌ها

روش نوع بازگشتی شرح مختصر
get Element() Element Gets the element that contains this Position .
get Offset() Integer Gets this Position 's relative location within the element that contains it.
get Surrounding Text() Text Creates an artificial Text element that represents the text and formatting of the Paragraph or List Item that contains the Position , either directly or through a chain of child elements.
get Surrounding Text Offset() Integer Gets the offset of this Position within the Text element returned by get Surrounding Text() .
insert Bookmark() Bookmark Creates and inserts a new Bookmark at this Position .
insert Inline Image(image) Inline Image |null Creates and inserts a new Inline Image at this Position from the specified image blob.
insert Text(text) Text |null Inserts the specified text at this Position .

Positioned Image

روش‌ها

روش نوع بازگشتی شرح مختصر
get As(contentType) Blob Return the data inside this object as a blob converted to the specified content type.
get Blob() Blob Return the data inside this object as a blob.
get Height() Integer Retrieves the image's height, in pixels.
get Id() String Gets the image's ID.
get Layout() Positioned Layout Gets an enum value that represents how the image is laid out.
get Left Offset() Number Gets the image's offset, in points, from the paragraph's left.
get Paragraph() Paragraph Gets the Paragraph the image is anchored to.
get Top Offset() Number Gets the image's offset, in points, from the paragraph's top.
get Width() Integer Retrieves the image's width, in pixels.
set Height(height) Positioned Image Sets the image's height, in pixels.
set Layout(layout) Positioned Image Sets the definition of how the image is laid out.
set Left Offset(offset) Positioned Image Sets the image's offset, in points, from the paragraph's left.
set Top Offset(offset) Positioned Image Sets the image's offset, in points, from the paragraph's top.
set Width(width) Positioned Image Sets the image's width, in pixels.

Positioned Layout

خواص

ملک نوع توضیحات
ABOVE_TEXT Enum The image is positioned above the text.
BREAK_BOTH Enum The image breaks the text on the left and right.
BREAK_LEFT Enum The image breaks the text on the left.
BREAK_RIGHT Enum The image breaks the text on the right.
WRAP_TEXT Enum The image is wrapped by text.

Range

روش‌ها

روش نوع بازگشتی شرح مختصر
get Range Elements() Range Element[] Gets all elements in this Range , including any partial Text elements (for example, in the case of a selection that includes only part of a Text element).

Range Builder

روش‌ها

روش نوع بازگشتی شرح مختصر
add Element(element) Range Builder Adds an entire Element to this Range Builder .
add Element(textElement, startOffset, endOffsetInclusive) Range Builder Adds a partial Text element to this Range Builder .
add Elements Between(startElement, endElementInclusive) Range Builder Adds two entire elements, and all elements between them, to this Range Builder .
add Elements Between(startTextElement, startOffset, endTextElementInclusive, endOffsetInclusive) Range Builder Adds two partial Text elements, and all elements between them, to the Range Builder .
add Range(range) Range Builder Adds the contents of another Range to this Range Builder .
build() Range Constructs a Range from the settings applied to the builder.
get Range Elements() Range Element[] Gets all elements in this Range , including any partial Text elements (for example, in the case of a selection that includes only part of a Text element).

Range Element

روش‌ها

روش نوع بازگشتی شرح مختصر
get Element() Element Gets the Element that corresponds to this Range Element .
get End Offset Inclusive() Integer Gets the position of the end of a partial range within the range element.
get Start Offset() Integer Gets the position of the start of a partial range within the range element.
is Partial() Boolean Determines whether this range element covers the entire element or a partial selection of the element's characters.

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Rich Link Returns a detached, deep copy of the current element.
get Attributes() Object Retrieves the element's attributes.
get Mime Type() String|null Returns the MIME type of the link, which is available when the item is a link to a Drive file and null otherwise.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Title() String Returns the link's displayed title.
get Type() Element Type Retrieves the element's Element Type .
get Url() String Returns the URL of the resource.
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Rich Link |null Merges the element with the preceding sibling of the same type.
remove From Parent() Rich Link |null Removes the element from its parent.
set Attributes(attributes) Rich Link Sets the element's attributes.

Tab

روش‌ها

روش نوع بازگشتی شرح مختصر
as Document Tab() Document Tab Retrieves the tab contents as a Document Tab .
get Child Tabs() Tab[] Retrieves the child tabs nested within this tab.
get Id() String Retrieves the ID of the tab.
get Index() Integer Retrieves the 0-based index of the tab within the parent.
get Title() String Retrieves the title of the tab.
get Type() Tab Type Retrieves the type of tab.

Tab Type

خواص

ملک نوع توضیحات
DOCUMENT_TAB Enum The type corresponding to Document Tab .

Table

روش‌ها

روش نوع بازگشتی شرح مختصر
append Table Row() Table Row Creates and appends a new Table Row .
append Table Row(tableRow) Table Row Appends the given Table Row .
clear() Table Clears the contents of the element.
copy() Table Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Attributes() Object Retrieves the element's attributes.
get Border Color() String|null Retrieves the border color.
get Border Width() Number|null Retrieves the border width, in points.
get Cell(rowIndex, cellIndex) Table Cell |null Retrieves the Table Cell at the specified row and cell indices.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Column Width(columnIndex) Number|null Retrieves the width of the specified table column, in points.
get Link Url() String|null Retrieves the link url.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Children() Integer Retrieves the number of children.
get Num Rows() Integer Retrieves the number of Table Rows .
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Row(rowIndex) Table Row |null Retrieves the Table Row at the specified row index.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
insert Table Row(childIndex) Table Row Creates and inserts a new Table Row at the specified index.
insert Table Row(childIndex, tableRow) Table Row Inserts the given Table Row at the specified index.
is At Document End() Boolean Determines whether the element is at the end of the Document .
remove Child(child) Table Removes the specified child element.
remove From Parent() Table |null Removes the element from its parent.
remove Row(rowIndex) Table Row Removes the Table Row at the specified row index.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Attributes(attributes) Table Sets the element's attributes.
set Border Color(color) Table Sets the border color.
set Border Width(width) Table Sets the border width, in points.
set Column Width(columnIndex, width) Table Sets the width of the specified column, in points.
set Link Url(url) Table Sets the link url.
set Text Alignment(textAlignment) Table Sets the text alignment.

Table Cell

روش‌ها

روش نوع بازگشتی شرح مختصر
append Horizontal Rule() Horizontal Rule Creates and appends a new Horizontal Rule .
append Image(image) Inline Image Creates and appends a new Inline Image from the specified image blob.
append Image(image) Inline Image Appends the given Inline Image .
append List Item(listItem) List Item Appends the given List Item .
append List Item(text) List Item Creates and appends a new List Item .
append Paragraph(paragraph) Paragraph Appends the given Paragraph .
append Paragraph(text) Paragraph Creates and appends a new Paragraph .
append Table() Table Creates and appends a new Table .
append Table(cells) Table Appends a new Table containing the specified cells.
append Table(table) Table Appends the given Table .
clear() Table Cell Clears the contents of the element.
copy() Table Cell Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Attributes() Object Retrieves the element's attributes.
get Background Color() String|null Retrieves the background color.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Col Span() Integer Retrieves the column span, which is the number of columns of table cells this cell spans.
get Link Url() String|null Retrieves the link url.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Children() Integer Retrieves the number of children.
get Padding Bottom() Number|null Retrieves the bottom padding, in points.
get Padding Left() Number|null Retrieves the left padding, in points.
get Padding Right() Number|null Retrieves the right padding, in points.
get Padding Top() Number|null Retrieves the top padding, in points.
get Parent() Container Element |null Retrieves the element's parent element.
get Parent Row() Table Row |null Retrieves the Table Row containing the current Table Cell .
get Parent Table() Table |null Retrieves the Table containing the current Table Cell .
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Row Span() Integer Retrieves the row span, which is the number of rows of table cells this cell spans.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
get Vertical Alignment() Vertical Alignment |null Retrieves the Vertical Alignment .
get Width() Number|null Retrieves the width of the column containing the cell, in points.
insert Horizontal Rule(childIndex) Horizontal Rule Creates and inserts a new Horizontal Rule at the specified index.
insert Image(childIndex, image) Inline Image Creates and inserts an Inline Image from the specified image blob, at the specified index.
insert Image(childIndex, image) Inline Image Inserts the given Inline Image at the specified index.
insert List Item(childIndex, listItem) List Item Inserts the given List Item at the specified index.
insert List Item(childIndex, text) List Item Creates and inserts a new List Item at the specified index.
insert Paragraph(childIndex, paragraph) Paragraph Inserts the given Paragraph at the specified index.
insert Paragraph(childIndex, text) Paragraph Creates and inserts a new Paragraph at the specified index.
insert Table(childIndex) Table Creates and inserts a new Table at the specified index.
insert Table(childIndex, cells) Table Creates and inserts a new Table containing the specified cells, at the specified index.
insert Table(childIndex, table) Table Inserts the given Table at the specified index.
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Table Cell |null Merges the element with the preceding sibling of the same type.
remove Child(child) Table Cell Removes the specified child element.
remove From Parent() Table Cell |null Removes the element from its parent.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Attributes(attributes) Table Cell Sets the element's attributes.
set Background Color(color) Table Cell Sets the background color.
set Link Url(url) Table Cell Sets the link url.
set Padding Bottom(paddingBottom) Table Cell Sets the bottom padding, in points.
set Padding Left(paddingLeft) Table Cell Sets the left padding, in points.
set Padding Right(paddingRight) Table Cell Sets the right padding, in points.
set Padding Top(paddingTop) Table Cell Sets the top padding, in points.
set Text(text) Table Cell Sets the contents as plain text.
set Text Alignment(textAlignment) Table Cell Sets the text alignment.
set Vertical Alignment(alignment) Table Cell Sets the vertical alignment.
set Width(width) Table Cell Sets the width of the column containing the current cell, in points.

Table Of Contents

روش‌ها

روش نوع بازگشتی شرح مختصر
clear() Table Of Contents Clears the contents of the element.
copy() Table Of Contents Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Attributes() Object Retrieves the element's attributes.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Link Url() String|null Retrieves the link url.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Children() Integer Retrieves the number of children.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
is At Document End() Boolean Determines whether the element is at the end of the Document .
remove From Parent() Table Of Contents |null Removes the element from its parent.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Attributes(attributes) Table Of Contents Sets the element's attributes.
set Link Url(url) Table Of Contents Sets the link url.
set Text Alignment(textAlignment) Table Of Contents Sets the text alignment.

Table Row

روش‌ها

روش نوع بازگشتی شرح مختصر
append Table Cell() Table Cell Creates and appends a new Table Cell .
append Table Cell(textContents) Table Cell Appends the given Table Cell containing the specified text.
append Table Cell(tableCell) Table Cell Appends the given Table Cell .
clear() Table Row Clears the contents of the element.
copy() Table Row Returns a detached, deep copy of the current element.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Element(elementType) Range Element |null Searches the contents of the element for a descendant of the specified type.
find Element(elementType, from) Range Element |null Searches the contents of the element for a descendant of the specified type, starting from the specified Range Element .
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Attributes() Object Retrieves the element's attributes.
get Cell(cellIndex) Table Cell |null Retrieves the Table Cell at the specified cell index.
get Child(childIndex) Element Retrieves the child element at the specified child index.
get Child Index(child) Integer Retrieves the child index for the specified child element.
get Link Url() String|null Retrieves the link url.
get Minimum Height() Number|null Retrieves the minimum height, in points.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Num Cells() Integer Retrieves the number of cells in the row.
get Num Children() Integer Retrieves the number of children.
get Parent() Container Element |null Retrieves the element's parent element.
get Parent Table() Table |null Retrieves the Table containing the current row.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Type() Element Type Retrieves the element's Element Type .
insert Table Cell(childIndex) Table Cell Creates and inserts a new Table Cell at the specified index.
insert Table Cell(childIndex, textContents) Table Cell Inserts the given Table Cell at the specified index, containing the given text.
insert Table Cell(childIndex, tableCell) Table Cell Inserts the given Table Cell at the specified index.
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Table Row |null Merges the element with the preceding sibling of the same type.
remove Cell(cellIndex) Table Cell Removes the Table Cell at the specified cell index.
remove Child(child) Table Row Removes the specified child element.
remove From Parent() Table Row |null Removes the element from its parent.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Attributes(attributes) Table Row Sets the element's attributes.
set Link Url(url) Table Row Sets the link url.
set Minimum Height(minHeight) Table Row Sets the minimum height, in points.
set Text Alignment(textAlignment) Table Row Sets the text alignment.

Text

روش‌ها

روش نوع بازگشتی شرح مختصر
append Text(text) Text Adds the specified text to the end of this text region.
copy() Text Returns a detached, deep copy of the current element.
delete Text(startOffset, endOffsetInclusive) Text Deletes a range of text.
edit As Text() Text Obtains a Text version of the current element, for editing.
find Text(searchPattern) Range Element |null Searches the contents of the element for the specified text pattern using regular expressions.
find Text(searchPattern, from) Range Element |null Searches the contents of the element for the specified text pattern, starting from a given search result.
get Attributes() Object Retrieves the element's attributes.
get Attributes(offset) Object Retrieves the attributes at the specified character offset.
get Background Color() String|null Retrieves the background color setting.
get Background Color(offset) String|null Retrieves the background color at the specified character offset.
get Font Family() String|null Retrieves the font family setting.
get Font Family(offset) String|null Retrieves the font family at the specified character offset.
get Font Size() Number|null Retrieves the font size setting.
get Font Size(offset) Number|null Retrieves the font size at the specified character offset.
get Foreground Color() String|null Retrieves the foreground color setting.
get Foreground Color(offset) String|null Retrieves the foreground color at the specified character offset.
get Link Url() String|null Retrieves the link url.
get Link Url(offset) String|null Retrieves the link URL at the specified character offset.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Text() String Retrieves the contents of the element as a text string.
get Text Alignment() Text Alignment |null Gets the text alignment.
get Text Alignment(offset) Text Alignment |null Gets the text alignment for a single character.
get Text Attribute Indices() Integer[] Retrieves the set of text indices that correspond to the start of distinct text formatting runs.
get Type() Element Type Retrieves the element's Element Type .
insert Text(offset, text) Text Inserts the specified text at the given character offset.
is At Document End() Boolean Determines whether the element is at the end of the Document .
is Bold() Boolean|null Retrieves the bold setting.
is Bold(offset) Boolean|null Retrieves the bold setting at the specified character offset.
is Italic() Boolean|null Retrieves the italic setting.
is Italic(offset) Boolean|null Retrieves the italic setting at the specified character offset.
is Strikethrough() Boolean|null Retrieves the strikethrough setting.
is Strikethrough(offset) Boolean|null Retrieves the strikethrough setting at the specified character offset.
is Underline() Boolean|null Retrieves the underline setting.
is Underline(offset) Boolean|null Retrieves the underline setting at the specified character offset.
merge() Text |null Merges the element with the preceding sibling of the same type.
remove From Parent() Text |null Removes the element from its parent.
replace Text(searchPattern, replacement) Element Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions.
set Attributes(startOffset, endOffsetInclusive, attributes) Text Applies the specified attributes to the given character range.
set Attributes(attributes) Text Sets the element's attributes.
set Background Color(startOffset, endOffsetInclusive, color) Text Sets the background color for the specified character range.
set Background Color(color) Text Sets the background color.
set Bold(bold) Text Sets the bold setting.
set Bold(startOffset, endOffsetInclusive, bold) Text Sets the bold setting for the specified character range.
set Font Family(startOffset, endOffsetInclusive, fontFamilyName) Text Sets the font family for the specified character range.
set Font Family(fontFamilyName) Text Sets the font family.
set Font Size(startOffset, endOffsetInclusive, size) Text Sets the font size for the specified character range.
set Font Size(size) Text Sets the font size.
set Foreground Color(startOffset, endOffsetInclusive, color) Text Sets the foreground color for the specified character range.
set Foreground Color(color) Text Sets the foreground color.
set Italic(italic) Text Sets the italic setting.
set Italic(startOffset, endOffsetInclusive, italic) Text Sets the italic setting for the specified character range.
set Link Url(startOffset, endOffsetInclusive, url) Text Sets the link URL for the specified character range.
set Link Url(url) Text Sets the link url.
set Strikethrough(strikethrough) Text Sets the strikethrough setting.
set Strikethrough(startOffset, endOffsetInclusive, strikethrough) Text Sets the strikethrough setting for the specified character range.
set Text(text) Text Sets the text contents.
set Text Alignment(startOffset, endOffsetInclusive, textAlignment) Text Sets the text alignment for a given character range.
set Text Alignment(textAlignment) Text Sets the text alignment.
set Underline(underline) Text Sets the underline setting.
set Underline(startOffset, endOffsetInclusive, underline) Text Sets the underline setting for the specified character range.

Text Alignment

خواص

ملک نوع توضیحات
NORMAL Enum The normal text alignment.
SUPERSCRIPT Enum The superscript text alignment.
SUBSCRIPT Enum The subscript text alignment.

Unsupported Element

روش‌ها

روش نوع بازگشتی شرح مختصر
copy() Unsupported Element Returns a detached, deep copy of the current element.
get Attributes() Object Retrieves the element's attributes.
get Next Sibling() Element |null Retrieves the element's next sibling element.
get Parent() Container Element |null Retrieves the element's parent element.
get Previous Sibling() Element |null Retrieves the element's previous sibling element.
get Type() Element Type Retrieves the element's Element Type .
is At Document End() Boolean Determines whether the element is at the end of the Document .
merge() Unsupported Element |null Merges the element with the preceding sibling of the same type.
remove From Parent() Unsupported Element |null Removes the element from its parent.
set Attributes(attributes) Unsupported Element Sets the element's attributes.

Vertical Alignment

خواص

ملک نوع توضیحات
BOTTOM Enum The bottom-alignment option.
CENTER Enum The center-alignment option.
TOP Enum The top-alignment option.