InDesign Add text to Paste Board

I have written a script to make individual PDFs of an Indesign Document, while also naming the files to our company’s naming convention. What I’m trying to add is sort of a watermark at the top of the page in the paste board that will print on the PDf in the bleed area with the file name. It works for the most part but I cannot get the “watermark” to print on pages after the first page. Here is my script, any help would be greatly appreciated. Thanks


tell application "Adobe InDesign CS4"
	activate
	tell (active document) to set {file_name, doc_pages, page_numbers} to {name, pages, name of pages}
	set issue_number to text returned of (display dialog "Enter the Issue Number" default answer "00") as string
	
	set region_list to {"National", "Arizona", "California COMMON", "California LA", "California OC", "California SD", "California BigBook", "Chicago", "Colorado", "Florida", "New York", "Texas COMMON", "Texas Austin", "Texas Dallas", "Texas Houston", "Texas BigBook", "Winter Common", "Spring Common", "Summer Common", "Fall Common"}
	set ZIP_list to {"NAT", "AZ", "CAL_COM", "LA", "OC", "SD", "CAL", "CH", "CO", "FL", "NY", "TEX_COM", "AUS", "DAL", "HOU", "TEX", "COM_LXWIN", "COM_LXSPR", "COM_LXSUM", "COM_LXFALL"}
	
	set region_code to choose from list region_list with prompt "Choose a Region:"
	tell result
		if it is false then return
		set region_code to item 1 of it
	end tell
	
	if region_code is false then return
	repeat with i from 1 to count region_list
		if item i of region_list is region_code then exit repeat
	end repeat
	set new_code to item i of ZIP_list
	
	set folder_path to (choose folder with prompt "Select folder to Save PDF files") as string
	
	
	set oldPref to page numbering of general preferences
	set page numbering of general preferences to section
	
	set pagesToPrint to (choose from list page_numbers with prompt "Choose Pages to PDF" with multiple selections allowed)
	if pagesToPrint is false then return
	
	set the_filename to file_name
	set prevTIDs to AppleScript's text item delimiters
	set AppleScript's text item delimiters to "_"
	set the_filename to text item 3 of the_filename
	set AppleScript's text item delimiters to prevTIDs
	
	
	repeat with anItem in pagesToPrint
		if length of anItem is 4 then
			set new_number to contents of anItem
		else
			set new_number to text -3 thru -1 of ("00" & anItem)
			tell (active document) to set the_frame1 to make new text frame
			set the geometric bounds of the_frame1 to {"-.0257 in", "6 in", "-.4118 in", "9 in"}
			set contents of the_frame1 to new_code & "_LX" & issue_number & "_" & new_number
			set vertical justification of text frame preferences to top align
			set justification of characters of the_frame1 to left align
			set applied font of characters of the_frame1 to "Helvetica (TT)"
			set font style of characters of the_frame1 to "Bold"
			set point size of characters of the_frame1 to 13
			set fill color of characters of the_frame1 to "Registration"
			set overprint fill of characters of the_frame1 to true
			set vertical justification of text frame preferences of the_frame1 to top align
			set capitalization of characters of the_frame1 to all caps
			
			tell (active document) to set the_frame2 to make new text frame
			set the geometric bounds of the_frame2 to {"-.0257 in", "15 in", "-.4118 in", "18 in"}
			set contents of the_frame2 to new_code & "_LX" & issue_number & "_" & new_number
			set vertical justification of text frame preferences to top align
			set justification of characters of the_frame2 to left align
			set applied font of characters of the_frame2 to "Helvetica (TT)"
			set font style of characters of the_frame2 to "Bold"
			set point size of characters of the_frame2 to 13
			set fill color of characters of the_frame2 to "Registration"
			set overprint fill of characters of the_frame2 to true
			set vertical justification of text frame preferences of the_frame2 to top align
			set capitalization of characters of the_frame2 to all caps
		end if
		set PDF_name to folder_path & new_code & "_LX" & issue_number & "_" & new_number & ".pdf"
		set page range of PDF export preferences to (anItem as string)
		tell active document to export format PDF type to PDF_name using "FryPDF" without showing options
		delete the_frame1
		delete the_frame2
	end repeat
	set page numbering of general preferences to oldPref
	say "DONE"
	display dialog "Your PDFs are Done" buttons {"Done"} default button 1
end tell
end

Put it on your Master page.

Hi. Extraneous information belongs in the slug, not the bleed.

Thank You for the replies…

Bluefrog, its a good idea but I need the information to change per page. and Marc technically its in the bleed but i extended the bleed area to act like a slug, because I could not get it print in the slug area other wise

G’day

Not sure if you ever got this working but here’s one way

	
repeat with x from 1 to pagesToPrint
	set anItem to x
	if anItem is greater than 999 then
		set new_number to contents of anItem
	else
		set new_number to text -3 thru -1 of ("00" & anItem)
		tell (active document) to set the_frame1 to make new text frame
		tell (active document) to move the_frame1 to spread x
	--etc
	--etc
	end if
end repeat

(I’m assuming “if length of anItem is 4 then” means there’s a thousand or more pages?)

d.