UNPKG

@extendscript/ind.util.pageitems

Version:

Utilities that create or target page items in InDesign.

19 lines (14 loc) 485 B
#include "test-header.js" var Doc = app.documents.add(); with( Doc.documentPreferences ){ pageHeight = "100mm"; pageWidth = "100mm"; documentBleedUniformSize = true; documentSlugUniformSize = true; documentBleedTopOffset = "10mm"; documentSlugTopOffset = "10mm"; }; var tf = Pageitems.addTextFrame( Doc.pages[0], {contents: "OK", autoSizingType: "HEIGHT_AND_WIDTH"} ); var contents = tf.contents; Doc.close(SaveOptions.NO); $.writeln( contents === "OK" );