So my intention is to store both the PDF and HTML source of a tab into one record.
I prefer to review documents in PDF format but if I store the source HTML as well, so I can extract meta data from it in the future as required.
My code below seems to work fine, with the exception of the “set source of theRecord to theHTML”.
The documentation seems to imply this should work…
source ([text] : The HTML/XML source of a record if available or the record converted to HTML if possible.
set name of theRecord to do JavaScript ("document.getElementsByTagName('h1')[0].innerHTML") in thisTab
set theHTML to source of thisTab
set thePDF to PDF of thisTab
set data of theRecord to thePDF
set URL of theRecord to theURL
set source of theRecord to theHTML
No matter what I do the source of theRecord is always empty. Any suggestions ?
Thanks
Frank