Page 1 of 1

html import into NWP

Posted: 2010-12-26 04:26:11
by Greiggy
I'm not finding that html import works well -- seems to give somewhat random results for heading sizes, and in my most recent trial, all the text and heading sizes are exactly double the CSS parameters.

For context, I'm working with a project in Tinderbox (a number of NWP users will be familiar with this). Tinderbox has a bit of a blind spot on the printing side, and only exports in html, and needs a lot of configuration to do that.

Through working with CSS I can get excellent output into Safari. Now I want to take that output and exercise control over pagination, headers and footers, smart quotes and the usual WP fine touches.

However, I am finding that NWP mangles the html on input.

I am open to the suggestion that the CSS may have to be constructed in one particular way out of the number of possible syntax approaches. Or just that I'm not that good at it...

I am also well aware that word processors do not, in general, handle html import well. MS Word is even worse. Some don't do it all all (e.g. Pages). So maybe I have an unreasonable expectation here. However, others will have travelled this road and I would like to learn from them, before simply assuming that NWP is not going to handle it well, and finding another route e.g. TextMate.

Re: html import into NWP

Posted: 2010-12-27 14:52:16
by martin
I'm sorry our HTML import hasn't been working so well for your content. We rely on OSX to handle HTML import, so there's likely little we can do to improve the situation.

Re: html import into NWP

Posted: 2010-12-28 04:01:00
by Greiggy
Thanks for that martin -- as I thought.

Anyone else got experience of importing html into NWP?

Re: html import into NWP

Posted: 2011-04-16 07:27:48
by ajcarr
I've started to use Markdown (MultiMarkdown, actually) to produce some documents in TextMate, convert to XHTML in TM, them open in NWP for WYSIWYG formatting. It works fine, unless there non-ASCII characters in the original Markdown file which are carried over into the XHTML (e.g., the Euro symbol or accented characters). NWP seems to ignore the XHTML document encoding line:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
and interprets the document using something other than UTF-8. Opening the file in Safari 5.0.5 displays the correct result, so NWP must be using a different API for converting XHTML compared to Safari.

Alun

Re: html import into NWP

Posted: 2011-04-17 11:55:41
by martin
ajcarr wrote:Opening the file in Safari 5.0.5 displays the correct result, so NWP must be using a different API for converting XHTML compared to Safari.
That's possible, but I can't be sure. We simply feed the file's path to Apple's Cocoa content loading system and it hands us back the rich text. How it does the decoding I couldn't say, and perhaps even varies depending on your version of OSX. I would think it uses WebKit (Safari) under the hood, but who knows.