I thought it easy to write something for Pages. BUT, it isn’t. I tried to figure out how to:
- add text to Pages (ok)
- to add a title page filled with a picture (cover)
- maybe to add metadata like author and title, rights for the file to export
- to export this beautiful file in epub format.
til now i’m able to fill pages with content, nothing more. The export feature doesn’t work at all.
set text_cont to "Blabla"
tell application "Pages"
set d to make new document -->OK, but not set d to make new document with properties (name: "Name", body text: text_cont)
set body text of d to text_cont-->OK
save d as "SLDocumentTypeEpub" in (path to desktop as text) & title_nm & ".epub" -->the exported file is empty!
--save document 1 as "SLDocumentTypeEpub" in (path to desktop as text) & title_nm & ".epub" -->no way
end tell