|Impressario for Authorware||All||PDF Forms||All|
The GetPageText() sprite method retrieves the text of the current page of an Impressario sprite, with the data in any fields appended to the end of the fixed PDF text.
However, after an initial call to GetPageText () on a given page, if you modify a text field on that page, the modification will not appear in subsequent calls to GetPageText(). This problem occurs because the text of the page is cached on the first call to GetPageText().
The workaround is to "flush" the cache, by calling the GetPageText() icon method on a different page of the document, before calling it on the page you are really interested in. Your PDF form document must have more than one page in order to use this workaround solution.
-- retrieve all text of the page, including any updated form data
-- do it for page 2, just to clear the cache
dummyPage := CallIcon(@"Impressario", #GetPageText, 2)
--now you can get the text of the current page
realPage := CallSprite(@"Impressario", #GetPageText)
The Impressario methods GetFields() and GetAllFields() are preferred, if you want to retrieve just the form data. These methods return the form control names and values in a list of Lingo property lists.