下のスクリプトで作成したテキスト枠を、ブリード領域のページ領域外に移動する必要があります。誰かが私の下のスクリプトを調整するのを助けることができるなら、それは素晴らしいでしょう。私はPage HeightとWidthを使ってX、Y調整を行う方法を決定しました。テキスト枠をページ外に出す
以下のコードをご覧ください。どんなに助けても大変感謝しており、事前に感謝します。
myDocument = app.activeDocument;
//The bleed and slug properties belong to the documentPreferences object.
with (myDocument.documentPreferences) {
//Bleed
documentBleedBottomOffset = "2in";
documentBleedTopOffset = "2in";
documentBleedInsideOrLeftOffset = "2in";
documentBleedOutsideOrRightOffset = "2in";
//Slug
slugBottomOffset = "0p";
slugTopOffset = "0p";
slugInsideOrLeftOffset = "0p";
slugRightOrOutsideOffset = "0p";
}
var myDocument = app.documents.item(0);
var myPage = myDocument.pages.item(0);
var myTextFrame = myPage.textFrames.add();
//Set the bounds of the text frame [x1, y1, x2, y2]
//The x1, y1 refers to the upper left coordinate position; the x2, y2 refers to the lower right coordinate
//x2 = Height and y2 = Width
myTextFrame.geometricBounds = [0, 0, .52, 5.5];
//Enter text in the text frame.
//("\r" is a return character.+
myTextFrame.contents = "FName Name//12345-6789//\r WxL//\r XXX-YYYYY//W x L-LtrRD//P_";
myTextFrame.parentStory.insertionPoints.item(-1).contents = SpecialCharacters.autoPageNumber;
//Note that you could also use a properties record to
//create the frame and set its bounds and contents in one line:
//var myTextFrame = myDocument.pages.item(0).textFrames.add({geometricBounds:[72, 72, 288, 288], contents:"This is some example text."});
//Absolute move: based on [X , Y] its important to keep in mind that all units are based on your document units
myTextFrame.move([1, 5.5]);
上記の処理では、ボックスをドキュメントの右下隅に配置します。私はボックスをX = -1.5161 X =に置いたがっていました(これは文書ページの下の.72です)。ドキュメントの高さが変わる可能性があることに注意してください。可変であるためにはこれが必要です) –