On 18 Sep 2015, at 2:10 AM, Yvan KOENIG <email@hidden> wrote:
Maybe for the first time I disagree with you. What is stored in the variable noteBody is not raw text. When it's stored in a text file with the correct header it may be written in a html document which contain every attributes. If I paste the clipboard filled by the posted script in a TextEdit or a Pages document, I get the styled text.
Perhaps I misunderstood. You wrote:
{{Unicode text, 300}, {string, 150}, {scrap styles, 22}, {«class utf8», 150}, {«class ut16», 302}, {scrap styles, 22}}
If that contained any styling, you should see something like «class rtf » in there. I was basing my view on that; my version of Notes doesn't have the term body showing in its dictionary, so I assumed it had changed and therefore I didn't run the code.
If I paste the clipboard filled by the posted script in a TextEdit or a Pages document, I get the styled text. So, I hoped that there is a way to convert this styled text into PDF datas.
You can do that, but it's fairly complicated, and it's not going to match what you get in the UI because the script has no knowledge of the page dimensions being used.
|