How to make addField text transparent or push it behind image
Hi, I have a pdf document that contains images which are digitised pages from a historic hand-written text. The text cannot be OCR'd. We have manually transcribed the text so I have it available to add into the document, but I want to do this a) automatically (I have potentially about 15 of these volumes, each with ca 600 pages); and b) so that it doesn't appear for people looking at the document but it does allow them to search and navigate directly to pages that a given words occurs on.
Currently I have this script (obviously I'll loop round pages and possibly read the text for each in from a file, but this is just to illustrate one page):
var f = this.addField("Page1Text","text",0,[10,10,500,500]);
f.display = display.noView;
f.textSize = 0;
f.textColor = color.transparent;
f.fillColor = color.transparent;
f.multiline = true;
f.readonly = true;
f.value = "1\nSpecimens illustrating Flora Tertiaria Helvetica\nFossil leaves &c Disco\nPetrified woods\nCoals British Columbia H.M.S Plumper\nFossils Port Stephen Dr Odenheimer\nCoals, James Russell, mineral surveyor\nCoal, Torbane Hill &c\nOne parcel miscellaneous\nEgyptian pebbles\nBoulders from Lebanon\nSoapstone &c";
f.fillColor = color.transparent appears to work but not f.textColor (it appears to give just an empty textbox)
setting f.display = display.hidden or = display.noView seems to make it invisible on screen as expected but stop it from being searchable
I have also tried adjusting the order of the values but without success.
I was wondering if there is a simple way to push the textbox behind the image (or bring the image to the front)?
Any other suggestions most welcome - this is my first attempt at using scripting within pdfs.
