XHTML to AttribString conversion has wrong paragraph style
XHTML to AttribString conversion has wrong paragraph style
- Subject: XHTML to AttribString conversion has wrong paragraph style
- From: Glen Simmons <email@hidden>
- Date: Fri, 7 Apr 2006 15:43:59 -0500
I'm converting some XHTML to an NSAttributedString like so:
webPrefs = [WebPreferences standardPreferences];
[webPrefs setDefaultFontSize:16];
[webPrefs setStandardFontFamily:@"Helvetica"];
optionsDict = [NSDictionary
dictionaryWithObjectsAndKeys:NSHTMLTextDocumentType,
NSDocumentTypeDocumentAttribute,
webPrefs, NSWebPreferencesDocumentOption, nil];
attrStr = [[NSMutableAttributedString alloc] initWithData:
[xmlStr dataUsingEncoding:NSUTF8StringEncoding]
options:optionsDict
documentAttributes:&attributesDict
error:&error];
This works, but the resulting attrib string has an NSParagraphStyle
whose ParagraphSpacing is set to the same as the font size, so it
ends up looking double-spaced. How do I get it to not do that?
Thanks,
Glen Simmons
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden